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

[50254] Filtering on share modal #14075

Merged
merged 18 commits into from
Nov 14, 2023

Conversation

HDinger
Copy link
Contributor

@HDinger HDinger commented Nov 1, 2023

  • (Frontend) Add filter option for type and role in the box header
  • (Frontend) Toggle with the additional bulkActions when selecting any checkbox
  • (Frontend) Show currently active filter in the dropdown
  • (Backend) Actually filter when selecting a filter
    • Extend MemberQuery by a filter for the entity
    • Filter for Role
    • Filter for Type
  • Add Test cases for filtering

Open Questions

  • Unset a filter
  • Keep role filter when selecting a type filter (and the other way around)

Handled separatly

  • When the filter results are empty, the Box switches to the blankslate, where no filter is available. Thus I cannot leave this stage any more. See ticket
  • Inherited permissions are in filter result set but might show a different permission if the user was shared separatly See ticket

https://community.openproject.org/projects/openproject/work_packages/50254/activity

@HDinger HDinger added the feature label Nov 1, 2023
@HDinger HDinger added this to the 13.1 milestone Nov 1, 2023
@HDinger HDinger force-pushed the implementation/50254-filtering-on-share-modal branch 2 times, most recently from b9aa7b5 to 6cfad47 Compare November 1, 2023 12:30
@HDinger HDinger force-pushed the implementation/50254-filtering-on-share-modal branch from 8defbc1 to a3dcb67 Compare November 9, 2023 12:59
@HDinger HDinger force-pushed the implementation/50254-filtering-on-share-modal branch from a5b393d to 8a1b4af Compare November 9, 2023 13:01
@HDinger HDinger force-pushed the implementation/50254-filtering-on-share-modal branch from 8a1b4af to 96c118f Compare November 9, 2023 13:46
@HDinger
Copy link
Contributor Author

HDinger commented Nov 9, 2023

Hi @aaron-contreras

I added the still open points to the description. Futher, the code needs some cleanup, especially this part. Other than that this ready for a first review.

Copy link
Contributor

@aaron-contreras aaron-contreras left a comment

Choose a reason for hiding this comment

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

Very nice so far, besides the open points and known issues you mentioned, it looks good to me. I'd like to see what the implementation turns out to be once we can chain both filter types at a time. Great job so far!

@HDinger HDinger marked this pull request as ready for review November 10, 2023 08:55
@HDinger
Copy link
Contributor Author

HDinger commented Nov 10, 2023

Hi @aaron-contreras

I excluded the inheritance problem to #50939 as I am unsure about the expected results and would like to discuss that with product first.

@aaron-contreras aaron-contreras self-assigned this Nov 13, 2023
The `MemberQuery` has a default_scope that checks a non-admin has a
certain set of permissions which are not required for the behavior of
the share modal (or visibility of work package shares for that matter).

Given that visibility is unscoped for the share modal, extracting a
separate query class that inherits from the MemberQuery sans the
default_scope made sense as a way to keep these two in sync minus
the varying visibility levels based on the current_user.
There were a couple of specs failing due to the new query layer and
injectable shares into the ModalBodyComponent. This commit standardizes
the interface to prevent this in an easy to follow manner.
Copy link
Contributor

@aaron-contreras aaron-contreras left a comment

Choose a reason for hiding this comment

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

Went ahead and fixed the pesky issues you were facing. You can merge whenever you're back :)

@HDinger
Copy link
Contributor Author

HDinger commented Nov 14, 2023

Thanks a lot, @aaron-contreras for jumping in! 🤗

@HDinger HDinger merged commit 4a18d0c into dev Nov 14, 2023
11 checks passed
@HDinger HDinger deleted the implementation/50254-filtering-on-share-modal branch November 14, 2023 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants