WP-59: Reload app page after every navigation #920
Merged
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.
Overview
After job submission, the success message will hang at the top of the screen even if you navigate away and back to the app (without refreshing the browser).
Direction
To replicate:
Related
Changes
currentApp
existsCore-Portal/client/src/redux/sagas/apps.sagas.js
Lines 23 to 27 in 6bfc782
Testing
UI
Message reset after changing tabs
Other error message still renders correctly
Notes
I investigated this behavior and have included comment on why this might be happening on the Jira ticket WP-59. Sal mentioned other solution which might work - "It may be possible to only use get_app, but we'll need to ensure we can handle the request properly on the backend to look for html in the database for the app record instead of sending a request to tapis for html apps." I tried other methods to reset the message after app loads successfully, added a useEffect hook for LOAD_APP & GET_APP dispatchers but this solution seemed to work the best.
Update:
After suggestions from Sal, I updated the logic on
app.sagas.js
to reload an app everytime it is clicked so the issue above issue is solved.