Refreshing page after inviting members on Project/Group Members Page
What does this MR do and why?
What
When on the Project or Group members page, you can invite users through a set of dialogs. Currently, after members are invited a toast is displayed with a success message. The list of members becomes stale and the end user must manually refresh the page to get an updated list.
The page now refreshes when a member is invited to a Project or Group, to refresh the data displayed on the page.
As a consequence, I have replaced the toast with an alert, anywhere the page refreshes, based on the Pajamas spec which states:
If there's a page refresh, or a message needs to be communicated after a user visits a new page, consider using an alert
Why
This is the first iteration to solve this issue, which requires the user to refresh the page manually to see changes.
This feature is implemented based on the following discussion.
I am aware that this implementation is not the best solution to solve the problem but it is the first iteration. This solution and the identified next interations are outlined in https://gitlab.com/gitlab-org/gitlab/-/issues/323226#note_1196354625.
Possible future iterations
Based on the discussion https://gitlab.com/gitlab-org/gitlab/-/issues/323226#note_1196354625 I have created issues #385272 and #385279 to capture future iterations to improve on the work done in this MR.
Screenshots or screen recordings
I made some GIFs to demonstrate the before and after behavior.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
For Projects
- From the landing page, use the menu in the top left to navigate to a Project.
- When in a Project, in left side menu, hover over Project information and select 'Members'.
- On the top right of the page, you should see a number of buttons for inviting members:
- Import from a project
- Invite a group
- Invite members
- All options should trigger a dialog to appear.
- Submitting the dialog will refresh the page.
For Groups
- From the landing page, use the menu in the top left to navigate to a Group.
- When in a Group, in left side menu, hover over Group information and select 'Members'.
- On the top right of the page, you should see a number of buttons for inviting members:
- Invite a group
- Invite members
- All options should trigger a dialog to appear.
- Submitting the dialog will refresh the page.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #323226