Skip to content
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

gh-417 Clear selection when adding to a data spec or after 24h #443

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

greg-at-occ
Copy link
Contributor

As discussed with Nigel, doesn't quite match the ticket but this approach should strike a good balance of convenience and avoiding confusion.

Closes #417

@NigelPalmer NigelPalmer force-pushed the feature/gh-417-element-selection-too-persistent branch from 65a23e5 to 17fb838 Compare September 13, 2024 13:14
Copy link
Contributor

@NigelPalmer NigelPalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issues

Selected items are not always removed after a Data Specification is updated or created. See comments for details.

Passed

Time out of selected items is working correctly

@@ -42,6 +39,7 @@ <h3>Current selection</h3>
<mdm-data-element-multi-select
[sourceTargetIntersections]="sourceTargetIntersections"
[dataElements]="(selectedElements$ | async) ?? []"
(selectionAddedToSpec)="clearSelection()"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mdm-data-element-multi-select is used in other parts of the code and the (selectionAddedToSpec) has not been added to these definitions which means the selection IS NOT cleared when using those parts. E.g, this one does not clear the spec list after being clicked.

image

Extra Task: The dialog in the screenshot above also does not disappear after the spec has been updated, even if the user clicks on "Open Data Specification" after the fields have been added. Could we please fix this whilst we are working in this area.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the clearSelection trigger here, but not on bookmarks page, since that selection is not persistent anyway and user may find it helpful to add a small set of fields to multiple specs (not now possible from the main browse)

Extra Task seems to have resolved itself by virtual of clearing the selection

src/app/data-explorer/selection.service.ts Show resolved Hide resolved
Copy link
Contributor

@NigelPalmer NigelPalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I have found another problem. If I log in as researcher_one and select some items, logout and login as manager_one then those items are still selected. I know it is a lot less common for people to share a computer these days, but this still does not feel correct. It creates the impression that users can view other users data.

@greg-at-occ
Copy link
Contributor Author

As discussed, use of localStorage can remain as-is for now, pending a larger review of its use in these UIs

Copy link
Contributor

@NigelPalmer NigelPalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with this now. A wider review will be carried out later.

@NigelPalmer NigelPalmer merged commit 7141d80 into develop Sep 18, 2024
5 checks passed
@NigelPalmer NigelPalmer deleted the feature/gh-417-element-selection-too-persistent branch September 18, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elements already selected upon initial page load of dataclass details
2 participants