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

MBS-12552 (V): Refactor JS code for central entity #2732

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

yvanzo
Copy link
Contributor

@yvanzo yvanzo commented Nov 14, 2022

Problem MBS-12552

The term “core” has been used so far with different meanings (some entities, public domain data, search indexes).

Solution

Following the pulll request #2731, it replaces this term with "central" in JavaScript code.

Checklist for author

  • Check that other instances of core entities in the repository are for public domain data/entity/table only.
    • Decide whether or not to rename “Core entities” in statistics

Action

  1. Update WikiDocs accordingly

Copy link
Member

@reosarevok reosarevok left a comment

Choose a reason for hiding this comment

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

"Central" keeps reading to me as "there's some to the left, some to the right, and then this one in the center", but I don't really care that much about the name as long as it's consistent.

@@ -66,6 +66,12 @@ declare type CoreEntityTypeT =
| NonUrlCoreEntityTypeT
| 'url';

declare type CreditableEntityT =
Copy link
Member

Choose a reason for hiding this comment

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

Creditable sounds like "it can be given a credit", which is a bit confusing because we already have entities that can get credits when used in relationships and others which can't. Is EntityWithArtistCreditsT very bad? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem with that. Replaced with commit 7c97f77.

@@ -7,6 +7,20 @@
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/

declare type AliasableEntityT =
Copy link
Member

Choose a reason for hiding this comment

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

"Aliasable" seems super strange. I'd probably go with EntitiesWithAliasesT, honestly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced with commit e5dd97e.

@@ -10,13 +10,12 @@
// MusicBrainz::Server::Entity::Recording::TO_JSON
declare type RecordingT = $ReadOnly<{
...AnnotationRoleT,
...ArtistCreditRoleT,
Copy link
Member

Choose a reason for hiding this comment

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

The change here moves from "either has them or has not" to "certainly has them" for both artist and artistCredit. Is this intended?

Copy link
Member

Choose a reason for hiding this comment

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

In fact, I see it's breaking flow, so probably not intended :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed that wasn’t supposed to be pushed. Dropped it. I gave up refining Flow types at that point.

@yvanzo
Copy link
Contributor Author

yvanzo commented Nov 15, 2022

For reference, the discussion about the term “Central” continued in comment to the ticket.

The logic would be to review the pull request #2731 first since it is ready and it precedes this one (which is a draft) as mentioned in the top-level comment. (Restored the intentionally nested items of the checklist.)

@yvanzo
Copy link
Contributor Author

yvanzo commented Mar 7, 2023

Rebased, amended and merged the 5 first commits unto the pull request #2885. We will advise the renaming to Central only if needed after we have refined as many occurrences of CoreEntityT to more adjusted types as possible.

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