-
Notifications
You must be signed in to change notification settings - Fork 295
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
Dashboard sharing modal state is preserved after closing #5372
Comments
IB ✅ |
(I'm marking this as a good first issue, but it's probably a bit more complicated than other issues. Feel free to take a look at the code mentioned in the IB first before tackling it and no worries if it's a bit too much and you want to unassign yourself 😄) |
@nfmohit, @asvinb, when I reviewed the PR, I realized that the changes aren't working when I click outside of the modal, which closes the modal; however, when I opened it, the changes are preserved. Could you investigate this? One more concern from my code review, could we add a test case to cover this scenario in cc: @tofumatt |
Thank you for the kind review @hussain-t! I have already fixed the first issue that you mentioned in the meantime, and am now working on the test case. I'll follow-up once done. |
@nfmohit, The expected scenario tests are supposed to be done in the |
QA Update ✅Verified 👍
Recording.116.mp4 |
Feature Description
Bug bash issue: https://app.asana.com/0/1202258919887896/1202436389160092 please refer to Asana issue for background
Similar to module settings which rollback to the initial/saved values/states when saved or exiting edit mode, the sharing settings modal should follow a similar pattern and start from a fresh state every time it is opened.
This means the "current" sharing settings should rollback to the saved values (we already have savedSharingSettings in state for this) and any other UI state should be reset as well (whether or not the user role select is in edit mode, no rows should be disabled, scroll position etc).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Note: The implementation should follow a similar pattern to the way module settings work (see
rollbackSettings
)Implementation Brief
assets/js/googlesitekit/modules/datastore/sharing-settings.js
,rollbackSharingSettings
with does not have any parameters and returns thetype
set to a new constantROLLBACK_SHARING_SETTINGS
and an emptypayload
.sharingSettings
tostate.savedSharingSettings
which are the original saved settings.assets/js/components/dashboard-sharing/DashboardSharingSettings/Footer.js
,rollbackSharingSettings
action within theonCancel
function if the sharing settings have changed.haveSharingSettingsChanged
selector of thecore/modules
data store.Test Coverage
rollbackSharingSettings
action.QA Brief
dashboardSharing
feature flag using the tester plugin.Changelog entry
The text was updated successfully, but these errors were encountered: