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

[ENG-5879] Hide Categories Section on Registrations #2352

Merged

Conversation

uditijmehta
Copy link
Contributor

  • Ticket: [https://openscience.atlassian.net/browse/ENG-5879]
  • Feature flag: n/a

Purpose

Hide Categories Section on Registrations

Summary of Changes

  • Modified the registries-metadata component template to hide the categories field.
  • Set a hideCategories flag in the component to control the visibility of the categories section.

@coveralls
Copy link

coveralls commented Oct 11, 2024

Pull Request Test Coverage Report for Build 11296277310

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 15 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.1%) to 63.574%

Files with Coverage Reduction New Missed Lines %
app/utils/intl/-missing-message.ts 1 0.0%
lib/osf-components/addon/components/node-category-picker/component.ts 2 0.0%
lib/osf-components/addon/components/editable-field/category-manager/component.ts 12 0.0%
Totals Coverage Status
Change from base Build 11218472903: -0.1%
Covered Lines: 6460
Relevant Lines: 9797

💛 - Coveralls

futa-ikeda
futa-ikeda previously approved these changes Oct 11, 2024
Copy link
Contributor

@futa-ikeda futa-ikeda left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link
Contributor

@brianjgeiger brianjgeiger left a comment

Choose a reason for hiding this comment

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

One question.

Comment on lines 30 to 38
@tracked hideCategories = true;
// Private properties
expandCitations = false;

@task({ on: 'didReceiveAttrs'})
@waitFor
async fetchProvider() {
this.provider = await this.registration?.provider;
this.hideCategories = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need hideCategories to be tracked and set it in fetchProvider, or could you leave it untracked and only set it at declaration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@brianjgeiger I made hideCategories tracked in case we needed it to be dynamic in the future, but since it’s always true right now, I could remove it. Should we make it untracked to keep things simple?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, let's keep it simple for now. I have a feeling it's more likely that we'll get rid of categories entirely rather than make it dependent on something else.

@uditijmehta uditijmehta merged commit c045aa5 into CenterForOpenScience:develop Oct 11, 2024
9 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.

4 participants