Skip to content

Fix DSO edit menu dropdowns#2144

Merged
tdonohue merged 1 commit intoDSpace:mainfrom
atmire:fix-dso-edit-menu-dropdowns
Apr 13, 2023
Merged

Fix DSO edit menu dropdowns#2144
tdonohue merged 1 commit intoDSpace:mainfrom
atmire:fix-dso-edit-menu-dropdowns

Conversation

@ybnd
Copy link
Copy Markdown
Member

@ybnd ybnd commented Mar 10, 2023

References

Description

The new DSO edit menu supports dropdowns, but it appears that this got broken when resolving conflicts with the SharedModule PRs: ng-bootstrap imports were limited and this use case was not reviewed as it's not visible by default.

Instructions for Reviewers

Add the following menu entries to DSOEditMenuResolver
{
  id: 'dropdowntest-a',
  parentID: 'dropdowntest',
  active: false,
  visible: true,
  model: {
    type: MenuItemType.TEXT,
    text: 'Test A'
  } as TextMenuItemModel,
  icon: 'adjust',
  index: 0,
},
{
  id: 'dropdowntest-b',
  parentID: 'dropdowntest',
  active: false,
  visible: true,
  model: {
    type: MenuItemType.TEXT,
    text: 'Test B'
  } as TextMenuItemModel,
  icon: 'bicycle',
  index: 1,
},
{
  id: 'dropdowntest-c',
  parentID: 'dropdowntest',
  active: false,
  visible: true,
  model: {
    type: MenuItemType.TEXT,
    text: 'Test C'
  } as TextMenuItemModel,
  icon: 'crosshairs',
  index: 2,
},
{
  id: 'dropdowntest',
  active: false,
  visible: true,
  model: {
    type: MenuItemType.TEXT,
    text: 'Dropdown Test'
  } as TextMenuItemModel,
  icon: 'question-circle',
  index: 500,
},

Before this PR, the resulting entry will appear as:
20230310-112739

After this PR, it should be rendered as a proper dropdown:
20230310-113237

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.

@ybnd ybnd self-assigned this Mar 10, 2023
@ybnd ybnd added bug quick win Pull request is small in size & should be easy to review and/or merge component: Item (Archived) Item display or editing labels Mar 10, 2023
@tdonohue tdonohue added the 1 APPROVAL pull request only requires a single approval to merge label Mar 10, 2023
@tdonohue tdonohue added this to the 7.6 milestone Mar 10, 2023
@tdonohue tdonohue self-requested a review March 30, 2023 14:55
Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @ybnd ! Gave this a quick test and it works as described.

@tdonohue tdonohue merged commit e986f10 into DSpace:main Apr 13, 2023
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 component: Item (Archived) Item display or editing quick win Pull request is small in size & should be easy to review and/or merge

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants