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

Fix i18n labels and alignment in vocabulary-treeview #2542

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

davide-negretti
Copy link
Contributor

@davide-negretti davide-negretti commented Oct 11, 2023

Description

i18n labels

The vocabulary-treeview uses the description variable to show an i18n label:

this.translate.get(`search.filters.filter.${this.vocabularyOptions.name}.head`).pipe(
  map((type) => lowerCase(type)),
).subscribe(
  (type) => this.description = this.translate.get('vocabulary-treeview.info', { type })
);

The label used to contain a type parameter, but it doesn't contain it anymore.
Therefore this code can be safely removed and the label can be used directly in the HTML template.

Alignment

The tree view uses fa-angle-right and fa-angle-down FA icons, which have different widths. When an item is expanded it is no longer aligned with other items:
Schermata del 2023-10-13 10-53-01

I added the fa-fw class to give the icons a fixed width:
Schermata del 2023-10-13 10-59-36

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue added bug 1 APPROVAL pull request only requires a single approval to merge port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels Oct 11, 2023
@alanorth
Copy link
Contributor

Hi @davide-negretti. What is vocabulary-treeview? I want to test this patch but I'm not sure what that is. Related to hierarchical vocabularies in the submission form or browse interface?

@tdonohue tdonohue requested a review from artlowel October 12, 2023 14:23
@davide-negretti
Copy link
Contributor Author

Hi @alanorth
It is in the browse interface, you can find it here: https://demo.dspace.org/browse/srsc

@davide-negretti davide-negretti changed the title Fix i18n labels in vocabulary-treeview Fix i18n labels and alignment in vocabulary-treeview Oct 13, 2023
@davide-negretti
Copy link
Contributor Author

@tdonohue I added a very very small commit to this PR to fix the treeview alignment

Copy link
Member

@artlowel artlowel left a comment

Choose a reason for hiding this comment

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

@tdonohue tdonohue merged commit 6828fa3 into DSpace:main Oct 26, 2023
10 checks passed
@dspace-bot
Copy link
Contributor

Successfully created backport PR for dspace-7_x:

@tdonohue tdonohue removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Oct 26, 2023
@tdonohue tdonohue added this to the 8.0 milestone Oct 26, 2023
@davide-negretti davide-negretti deleted the DURACOM-190 branch October 26, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge bug
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants