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

Add list filtering to lane editor. #50

Merged
merged 6 commits into from
Oct 3, 2022
Merged

Conversation

ray-lee
Copy link
Contributor

@ray-lee ray-lee commented Sep 29, 2022

Description

This adds the ability to filter the lists that are shown when editing a lane. The options are to show only the lists owned by the current library (the default), only lists shared by other libraries, or all lists.

localhost_8080_admin_web_lanes_ray_create_179

It also adds a share icon to lists that are owned by other libraries, to make them easy to differentiate.

localhost_8080_admin_web_lanes_ray

Motivation and Context

This makes it easier for librarians to find their own lists, vs. lists shared by other libraries, when creating lanes.

Notion: https://www.notion.so/lyrasis/Add-filtering-options-to-lists-when-editing-a-lane-08b679fb44124a6aa9cd8743a003a43c

How Has This Been Tested?

  1. In one library, create a list, and share it.
  2. In a second library, create a list that is not shared.
  3. In the second library, create a new Lane.
    In Available Lists, the Show menu should have "Owned" selected. Only the owned list should appear. The list shared by the first library should not appear.
  4. In the Show menu, select "Subscribed".
    The owned list should disappear, and the list shared by the first library should appear.
  5. In the Show menu, select "All".
    All the lists should appear. The list shared from the first library should have a share icon next to its name, and the owned list should not.
  6. Drag the shared list to the lane on the right.
    The list should disappear from the Available Lists list, and appear in the Lists in This Lane list.
  7. In the Show menu, select "Subscribed".
    The Available Lists list should remain empty, and the shared list should continue to appear in the Lists in This Lane list.
  8. Drag the shared list from the right to the left.
    The shared list should appear in the Available Lists list, and disappear from the Lists in This Lane list.

Checklist:

@ray-lee ray-lee marked this pull request as ready for review September 29, 2022 22:45
@ray-lee ray-lee requested a review from a team September 29, 2022 22:45
Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

@@ -75,7 +118,12 @@ export default class LaneCustomListsEditor extends React.Component<
>
<GrabIcon />
Copy link
Contributor

Choose a reason for hiding this comment

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

ll. 119-131 is duplicated below in ll. 188-200. Would it be useful to refactor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I extracted the duplicate code into its own function.

@ray-lee ray-lee merged commit ce8cafe into main Oct 3, 2022
@ray-lee ray-lee deleted the lane-editor-list-filtering branch October 3, 2022 17:46
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.

2 participants