-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Bulk Tagger updates #8575
Bulk Tagger updates #8575
Conversation
8e71043
to
751fbb2
Compare
This is incredible progress. Here are a few things that may make the experience a bit more consistent + intuitive + useful Edit:
|
One more TODO:
|
0fd2e7a
to
8c937f9
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #8575 +/- ##
==========================================
+ Coverage 16.65% 16.68% +0.02%
==========================================
Files 85 88 +3
Lines 4406 4680 +274
Branches 765 835 +70
==========================================
+ Hits 734 781 +47
- Misses 3191 3383 +192
- Partials 481 516 +35 ☔ View full report in Codecov by Sentry. |
- Updates selected tags using `updateAllWorksTagged` method, which also updates the UI. - Stops adding tags to the `tagsToAdd` queue when all works initially have the same tag. - Allows tags that initially belong to all selected works to be removed.
006259d
to
19a5332
Compare
4474eb7
to
5b4b156
Compare
Adds new `cta-btn--primary` class, which has the same styling as our `available` buttons. Adds styling for `disabled` states of these buttons. Submission button now begins in a disabled state. On menu option click, or menu option creation, the disabled state is removed if any tag is staged for submission.
16aa181
to
41c4964
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Would be great to add statsd for:
|
Closes #8479
Closes #8435
Closes #8584
Updates the bulk tagger to display the selected works' subjects. The bulk tagger can also remove subjects from works.
UI
The bulk tagger has four important parts.
POST
s the form.The Menu Options
Each option represents a subject tag, and can have one of three possible states:
All selected works share this tag (denoted by check mark).
At least one selected work, but not all, share this tag (denoted by dash).
None of the selected works have this tag (no indicator for this state).
Menu options are represented by the
MenuOption
class, which is responsible for the following:rootElement
: Reference to the affordance's root element.tag
: Object representing a subject tag, with a name and type. Intended for read only.optionState
: Integer value representing one of the three aforementioned states.worksTagged
: The total number of selected works that share this tag.optionState
change.The actions taken when a menu option is clicked are dependent on the option's state:
2. Stage tag for removal
3. Change state to "No works tagged"
2. Change state to "All works tagged"
2. Stage tag for addition
3. Change state to "All works tagged"
The Menu Option Containers
Menu options are placed in one of two containers:
Each container is represented by a
SortedMenuOptionContainer
object, which does the following:Create Tag Options
Provides means for librarian to create a new subject tag using the contents of the search field. This affordance is hidden whenever the search field's trimmed value is an empty string.
Submit Button
This button is always present, but only enabled if there are tags staged for submission.
Technical
Testing
Stakeholders