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

feat(Relationship Types): Relationship Types Editor and Relationship Types Page #1005

Merged

Conversation

the-good-boy
Copy link
Contributor

This PR makes the following changes:

Relationship Type Editor
This PR adds a Relationship Type Editor that allows us to add new relationship types and edit existing ones.
RelationshipTypeEditor

You can also add a parent relationship type using a Parent Type Modal:
ParentTypeModal

You can also add pre-defined attributes to relationships:
AttributeTypes

Relationship Types Page
This PR also adds a Relationship Types page, which allows us to view and then edit existing relationship types.
RelationshipTypes

This Page follows a tree type structure similar to what we have in MB.

Other
The Privilege Dropdown has some more options now. Link for admin logs page has also been moved here:
NewPrivDropdown

@the-good-boy the-good-boy marked this pull request as ready for review July 31, 2023 16:20
@MonkeyDo MonkeyDo self-requested a review August 1, 2023 11:09
Copy link
Member

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

Nice work again :)
Looking quite good already !

I like the way it looks and the way it works.
I do have some suggestions, having played with the tools in test and given it some thought.

My main thoughts are:

  • the relationship type page is super useful and should not be limited to admins
  • admins should have extra options on that page though, such as the edit button…
  • …and an "add new relationship" button as well on that same page? We probably don't need the "Relationship Type Editor" button in the menu in that case.
  • Hard as it may be to implement, the relationship type matrix MusicBrainz has (https://musicbrainz.org/relationships) is a good visualization for the top-most level with all the relationships, rather than a long list. Alternatively, sorting and separating relationships by source entity type into separate sections with a small header could work for now since we don't have a ton of relationships.

src/client/components/footer.js Show resolved Hide resolved
src/client/components/forms/type-editor/typeUtils.tsx Outdated Show resolved Hide resolved
src/server/routes/adminLogs.tsx Outdated Show resolved Hide resolved
src/server/routes/adminLogs.tsx Outdated Show resolved Hide resolved
src/server/routes/relationship-types.tsx Outdated Show resolved Hide resolved
webpack.client.js Outdated Show resolved Hide resolved
src/client/components/footer.js Outdated Show resolved Hide resolved
const relationshipTypeEditorOptions = (
<>
<NavDropdown.Item href="/relationship-type/create">
Relationship Type Editor
Copy link
Member

Choose a reason for hiding this comment

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

OK, I've got it now.
Having thought about it some more, this link should probably be called "Create relationship type" instead and have this icon combination:
image

What do you think, does that make more sense?

For the layered icon:
https://codepen.io/Monkeyyyy/pen/VwVgpYQ

src/common/helpers/utils.ts Outdated Show resolved Hide resolved
test/src/server/routes/type-editor/relationship-type.js Outdated Show resolved Hide resolved
test/src/server/routes/type-editor/relationship-type.js Outdated Show resolved Hide resolved
test/src/server/routes/type-editor/relationship-type.js Outdated Show resolved Hide resolved
Copy link
Member

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

All righty, we're good to go !
Nice work :)

@MonkeyDo MonkeyDo merged commit db6e08c into metabrainz:administration-system Aug 18, 2023
4 checks passed
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.

3 participants