-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
LB-1281: Link all listens from the same album #2956
Conversation
The failing server tests are unrelated, and already fixed by #2951 |
To show unmatched listens grouped by release name
based on common release_name attribute
match all listens we can based on the tracklist of a selected release, using FuseJS to do fuzzy matching . Submission not working yet
default to closed, but add a boolean prop to default to open. Fix arrow indicator layout
in the settings/missing-data folder, which makes more sense
Put the button first for a cleaner look, and also reduce its size to fit in the header better
Since I rebased (Class -> functional component) I need to change a few things. + a bit of cleanup
+ clean up component
while writing tests, ran into a couple of issues, one with the import style for React (import React vs. import * as React). Also improved accessibility while writing tests
Added these items for extra testing, forgot to commit in previous commit...
d5d13ba
to
5bfaf77
Compare
LOVE IT!! 1. Swap the link and "expand release" buttons 2. Clicking the link button should not expand the release 3. Release row formatting 4. New blurb text 5. Old blurb text/suggestion
If we want to keep a link like "Add missing data to MusicBrainz" I think it would better fit in the blurb in the following note 6. where the user will be facing the issue to be solved (not finding a match in the search box). 6. Link popup title 7. Link popup blurb
Also applies to matching single listen/song 8. Link popup: Listens to match section 9. Link popup: Add mapping button 10. Mobile Sorry for the long list, hope it's helpful! |
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.
The PR looks good overall. A few changes.
frontend/js/src/settings/missing-data/MultiTrackMBIDMappingModal.tsx
Outdated
Show resolved
Hide resolved
Separate the button from the rest of the title to allow clicking the action button without collapsing/opening the accordion
also remove the superfluous explanation text I previously added
When you click the link button, the search field autofills with "album artist". Changing that to "album - artist" is giving me better search results on some releases. |
For what it's worth, grouping the words of the artist name gives even better results: |
Thanks for the tip! I did add the grouping. |
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.
The PR looks good. Just some final changes.
frontend/js/src/settings/missing-data/MultiTrackMBIDMappingModal.tsx
Outdated
Show resolved
Hide resolved
frontend/js/src/settings/missing-data/MultiTrackMBIDMappingModal.tsx
Outdated
Show resolved
Hide resolved
Meh, actually for special-punctuation-only bands, we would need to escape the characters to get a good result: I feel that we need to make a decision, but none are optimal considering the vague data we are working with (sometimes the metadata is good, sometimes trash). All right then, I guess we need another tickbox option to escape the search input! |
Allow searching with and without the artist name, and also escaping special characters from the Lucene search string (allows matching special cases)
We don't need to react to the 'page' searchparam anymore, and instead we load all of the data in one go, then parse it for internal pagination. Decoupling loader data and search params means we don't re-fetch data pueposelessly when "changing page"
pass only the function we need from the APIService rather than the whole thing.
Remove style from list of tracks, but make the toasts themselves clear
Expected a number, but it's a string representation
Change from form+onSubmit to button+onClick, because the search inpur has a required attribute preventing the form submission
Freshly deployed to test.LB OK, going to stop work here for this PR, before I continue adding more features :D It works really well from my testing, and I have implemented all the feedback as far as I know. Thanks everyone for your help in testing and for your suggestions ! |
Using the wrong variable after a copy-paste
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.
The PR looks much better. Just two final change change and we're good to go 🚀
const closeModal = React.useCallback(() => { | ||
modal.hide(); | ||
document?.body?.classList?.remove("modal-open"); | ||
// Need to manually remove the modal backdrop | ||
const backdrop = document?.body?.getElementsByClassName( | ||
"modal-backdrop" | ||
)?.[0]; | ||
backdrop?.parentElement?.removeChild(backdrop); | ||
setTimeout(modal.remove, 200); | ||
}, [modal]); |
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.
Right now if you close the modal by clicking on the backdrop and open another one, the states are not reset. I can still see the matches from the previous album. So we probably need to reset the states here.
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.
I don't think I can fix that issue unfortunately.
Basically, I've been putting off replacing Bootstrap4 that we have with react-bootstrap, and replace all the modals to work better with nice-modal-react.
Clicking on the backdrop does trigger the bootstrap JS code to hide the modal, but does not trigger any of the code in the modal component so i can't run code to cleanup.
Potential solutions are very hacky and ugly, and I'd rather not.
I tried listening to the 'hidden' event as described in https://getbootstrap.com/docs/4.0/components/modal/#events but to no avail.
Let's live with this failure mode until we use react-bootstrap.
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.
Makes sense. Cool! We'll deploy this for now, and revisit it later.
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.
Yeah, another big refactoring job :)
But at least we'll be able to get rid of jQuery that we still load for those stupid Bootstrap modals and tooltips and whatnot
frontend/js/src/settings/missing-data/MultiTrackMBIDMappingModal.tsx
Outdated
Show resolved
Hide resolved
If closing modal with clicking on backdrop, modal is not currently reset and get re-opened with old data
The "Missing data" page that shows a user their unmatched listens has been somewhat useful, but linking each track from an album separately is a nightmare, especially for big various artist compilations for example.
This PR does two things to solve this:
release_name
property, and display them in an accordion componentI threw these bits of helptext together, would appreciate some feedback and/or rewriting:
For the "include artist name" tickbox:
Follow-up tasks
Ask aerozol's forgiveness for ignoring his mockups and suggested UX in LB-1281