-
Notifications
You must be signed in to change notification settings - Fork 50
1296 infinite loading when visiting non existent application #1985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
silverkszlo
merged 13 commits into
main
from
1296-infinite-loading-when-visiting-non-existent-application
Sep 3, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
08f48e2
catch 404 when loading context, table, view
silverkszlo 338279b
show error messages in ui for nonexistent context, table, view
silverkszlo 94974a1
check for missing table/view children in existing context
silverkszlo 1bbd4cb
add ErrorMessage component
silverkszlo 131d535
refactor table, view, context and use ErrorMessage
silverkszlo 8e1e4db
provide fallback titles for missing tables, views, apps
silverkszlo 2467e1a
add cypress test for 404 error handling
silverkszlo 281a2da
fix(table/view): always render MainModals for proper nav and creation…
silverkszlo 8486b12
fix(context): always render MainModals for proper nav and creation btns
silverkszlo c11e9d6
stay on errorpage after reload on a non-existing app page
silverkszlo e7e7334
(fix/table): redirect to startpage after deleting table
silverkszlo 69ecdf3
refactor table and view components
silverkszlo e9d736a
correct translations in error messages
silverkszlo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| /** | ||
| * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
| let localUser | ||
|
|
||
| describe('Entity not found error handling', () => { | ||
| before(function() { | ||
| cy.createRandomUser().then(user => { | ||
| localUser = user | ||
| cy.login(localUser) | ||
| }) | ||
| }) | ||
|
|
||
| beforeEach(function() { | ||
| cy.login(localUser) | ||
|
|
||
| cy.intercept('GET', '**/tables/999', { statusCode: 404 }).as('getTable') | ||
| cy.intercept('GET', '**/views/999', { statusCode: 404 }).as('getView') | ||
| cy.intercept('GET', '**/contexts/999*', { statusCode: 404 }).as('getContext') | ||
|
|
||
| cy.visit('apps/tables') | ||
| }) | ||
|
|
||
| it('Shows error message when table is not found', () => { | ||
| cy.visit('/apps/tables/#/table/999') | ||
|
|
||
| cy.get('.error-container', { timeout: 10000 }) | ||
| .should('contain.text', 'This table could not be found') | ||
| }) | ||
|
|
||
| it('Shows error message when view is not found', () => { | ||
| cy.visit('/apps/tables/#/view/999') | ||
|
|
||
| cy.get('.error-container', { timeout: 10000 }) | ||
| .should('contain.text', 'This view could not be found') | ||
| }) | ||
|
|
||
| it('Shows error message when application is not found', () => { | ||
| cy.visit('/apps/tables/#/application/999') | ||
|
|
||
| cy.get('.error-container', { timeout: 10000 }) | ||
| .should('contain.text', 'This application could not be found') | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| <!-- | ||
| - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
| - SPDX-License-Identifier: AGPL-3.0-or-later | ||
| --> | ||
|
|
||
| <template> | ||
| <div class="error-container"> | ||
| <IconTables :size="64" style="margin-bottom: 1rem;" /> | ||
| <p>{{ message }}</p> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script> | ||
| import IconTables from '../../../shared/assets/icons/IconTables.vue' | ||
|
|
||
| export default { | ||
| name: 'ErrorMessage', | ||
| components: { IconTables }, | ||
| props: { | ||
| message: { | ||
| type: String, | ||
| required: true, | ||
| }, | ||
| }, | ||
| } | ||
| </script> | ||
|
|
||
| <style lang="scss"> | ||
| .error-container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| text-align: center; | ||
| padding: 2rem; | ||
| height: 100dvh; | ||
| min-height: 100%; | ||
| color: var(--color-text); | ||
| opacity: 0.6; | ||
|
|
||
| p { | ||
| font-size: clamp(1.2rem, 4vw, 2rem); | ||
| font-weight: 600; | ||
| max-width: 90%; | ||
| word-wrap: break-word; | ||
| } | ||
| } | ||
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.