-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
BB-444: Revision Display Page Improvement (WIP) #410
Conversation
I changed the BBID to AliasName. What other changes should be made on this page @MonkeyDo ? I think the way relationship is shown here is not very good. I added four relationships to "God Emperor of Dune" and the bbids in the table are of this work itself. I think it would be better if those bbids were of the other entity whom which this work is related to. Even though "Public Affairs" and "Wonder Woman" were revised, their changes are not shown ( a bug maybe). What do you think? |
@prabalsingh24 What do you think? |
It definitely looks better. Maybe it would be good to also show the BBID? maybe under the title in a I agree the way relationships are displayed is terrible. There's lots of low hanging fruits to make that page better. As for @chinmay-kothari 's concern about long names, you'll have to make sure the name wraps correctly, but I don't think we have many other options. |
Possibly. How did you make changes to the relationships of God Emperor of Dune as well as Public Affairs and Wonder Woman at the same time? |
I was editing "God Emperor of Dune" and I kept adding relationships. |
|
The The |
@MonkeyDo Tagging you because the option to ask for a review is not showing up :P |
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.
This is already a lot better than what was there before, well done!
It's courageous to attack this small mountain of cryptic code that is the diff formatters!
I think this will be a good first step, but ultimately we'll want to implement more changes.
For one, as you mentioned, changes in the order of arrays are not well handled by deep-diff.
We may be able to solve this by sorting elements by id before comparing, or we may want to move away to another library.
I find in particular that identifier diffs are very annoying that way
This comment suggests there might be a way to ignore the order of keys (maybe needs updating the package)
This issue has a few candidates for library replacement (for another day)
I also think there's a better way to display relationships, but it'll take some time to design and implement. @anirudhjain75 suggested in a GSOC proposal to visualize them as a graph, which I think has a lot of potential but will be pretty dense work and needs a clear path.
I'd love something that looks similar to the image that is on the BB help page
Same as before, then. That's unfortunate. Would it help to print out the data of two specific revisions (before/after) to be able to test it in a sandbox? |
We ARE sorting it by ids. https://github.com/bookbrainz/bookbrainz-data-js/blob/1b3bf5c12326a8419401f283e25e014aca917347/src/util.js#L158 how about we compare relationshipSet and IdentifierSet by brute force. Picking up one relationship from the old set and check if it's present in the new set? Code might get little messy but it can work. (I think). Because we are facing problem only in sets (in the array). Lemme try this once. I think I can get it done. |
Hmmmm. It's been a while I looked into this in detail :p |
Looking at the sorting code again, it looks like we're not sorting by ID but rather by value and type.label, which might explain why it's all over the place. |
@MonkeyDo I'll be afk for about a week. I'll continue this later. Is that alright? |
Of course! You certainly do not need my permission ! |
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.
This looks much better already!
The issue with the diff library regarding arrays of objects (like identifiers) will be for another day (I created this separate issue).
However I'm seeing some issues with the relationship formatting:
I'm not exactly sure why that's happening, but on the Author side, the relationship that appears is not the correct one: "Compiler -> da17a8fa-…" (an edition) instead of "Author -> 8ee4cace-…".
It looks fine on the Work side however, and definitely an improvement over what was there XD.
add formatRemoveRelatioship show bbid of the other entity in the relationship column in the table
You can Ignore the previous review. |
WIP
PR not ready for review rn