GC Digital Talent is the new recruitment platform for digital and tech jobs in the Government of Canada. // Talents numรฉriques du GC est la nouvelle plateforme de recrutement pour les emplois numรฉriques et technologiques au gouvernement du Canada.
On the Edit Job page, submitting an inline form causes the whole page to refresh and be hidden under a spinner. This seems to bypass one of the reasons to use inline forms, which is to not disrupt the overall page when editing a section.
๐ฆ Expected Behaviour
After submitting an inline form, that form should show a pending state until its data is submitted and refreshed. The rest of the page should not be affected.
๐ต๏ธ Details
QUESTION: Are there other pages with inline forms where this happens as well?
๐ Steps to Reproduce
Create or edit a pool as an admin role
edit a specific section and submit
See the whole page disappear under the spinner, and you end up back at the top of the page when its done.
๐ธ Screenshot
๐โโ๏ธ Proposed Solution
I assume this is because we are loading pool data at the root of the page component (for things like header and breadcrumb information) and this data is invalidated when an inline form updates the pool.
I suspect the solution would be to change when we show the pending component (spinner) in that root component. Instead of doing it whenever a request is pending, we can do it only when we have no data at all.
We'll need to do something similar but different for individual forms. By default, each inline form's data will be invalidated when any pool form submits. Again, we don't have to show the pending state while its refreshing. But we'll need some other way to trigger the pending state for the form which HAS just submitted.
โ Acceptance Criteria
[ ] Submitting an inline form on Edit Pool page does not hide entire page under a spinner
[ ] Submitting an inline form on Edit Pool page causes that form to display a spinner while it is submitting and refreshing
[ ] Submitting an inline form on Edit Pool page does not cause other inline forms to show pending state.
๐ Bug
On the Edit Job page, submitting an inline form causes the whole page to refresh and be hidden under a spinner. This seems to bypass one of the reasons to use inline forms, which is to not disrupt the overall page when editing a section.
๐ฆ Expected Behaviour
After submitting an inline form, that form should show a pending state until its data is submitted and refreshed. The rest of the page should not be affected.
๐ต๏ธ Details
QUESTION: Are there other pages with inline forms where this happens as well?
๐ Steps to Reproduce
๐ธ Screenshot
๐โโ๏ธ Proposed Solution
I assume this is because we are loading pool data at the root of the page component (for things like header and breadcrumb information) and this data is invalidated when an inline form updates the pool.
I suspect the solution would be to change when we show the pending component (spinner) in that root component. Instead of doing it whenever a request is pending, we can do it only when we have no data at all.
We'll need to do something similar but different for individual forms. By default, each inline form's data will be invalidated when any pool form submits. Again, we don't have to show the pending state while its refreshing. But we'll need some other way to trigger the pending state for the form which HAS just submitted.
โ Acceptance Criteria