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

Metadata Editor: rework pages and introduce an interactive table UI component #797

Merged
merged 12 commits into from
Feb 22, 2024

Conversation

jahow
Copy link
Collaborator

@jahow jahow commented Feb 16, 2024

Description

This PR does:

  • introduce a gn-ui-interactive-table UI component in ui/layout which is used both for records and users lists
  • introduce a gn-ui-results-table smart component in feature/search which is bound to the search facade, shows a list of records and offers sorting options; also responsible for the selection/deselection of records
  • simplify the components in the metadata-editor app to rely on these components
  • slightly change the layout of the tables in the editor to match the mockups
  • fixed the issue where clicking on a record in the table would not take the user to the editor; now this action works correctly

Architectural changes

Made several components standalone, removed the gn-ui-record-table component which was too specific to the editor and isn't used anymore.

Screenshots

image

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Feb 16, 2024

Affected libs: api-repository, feature-catalog, feature-record, feature-router, feature-search, feature-map, feature-dataviz, feature-auth, common-domain, api-metadata-converter, feature-editor, ui-search, common-fixtures, util-shared, ui-elements, ui-catalog, ui-widgets, ui-inputs, ui-layout, ui-map, ui-dataviz,
Affected apps: metadata-editor, datahub, demo, webcomponents, map-viewer, search, datafeeder, metadata-converter, data-platform,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@coveralls
Copy link

coveralls commented Feb 16, 2024

Coverage Status

coverage: 83.442% (+1.3%) from 82.139%
when pulling 360f2c8 on ME-open-edit-form
into 266c975 on main.

@jahow jahow force-pushed the ME-open-edit-form branch 2 times, most recently from 60e5e28 to 360f2c8 Compare February 16, 2024 20:43
})

describe('#handleRecordSelectedChange', () => {
it('should call selectRecords when checkbox is clicked', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Possible misleading comment, as the click is not part of the test, if at some point the event is changed to another, the comment might not be changed.

Comment on lines 186 to 189
it('returns false if no record selected', async () => {
selectionService.selectedRecordsIdentifiers$.next(['4', '5'])
expect(await firstValueFrom(component.isSomeSelected())).toBe(false)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand this test compared to the previous one? Are there no selected records because 4 and 5 are not part of the possible selection? If so, this should be explicit in the description.

}
}

async selectAll() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe rename to toggleCompleteSelection or toggleSelectAll, as this can deselect too.

Copy link
Collaborator

@LHBruneton-C2C LHBruneton-C2C left a comment

Choose a reason for hiding this comment

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

Very interesting! Sorry for all the comments outside the review, most of them will be subjects of discussions I guess.

@jahow
Copy link
Collaborator Author

jahow commented Feb 22, 2024

@LHBruneton-C2C I addressed all your comments I think, the fact is that this PR is only a partial refactoring of the dashboard view and there will probably be other ones later on to match the latest mockups, which is why I am not pushing this too far. Let me know if you feel that makes sense!

Copy link
Collaborator

@LHBruneton-C2C LHBruneton-C2C left a comment

Choose a reason for hiding this comment

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

@jahow Thanks for the explanations! And great work, this is quite a beast.

@jahow jahow merged commit 5b8d393 into main Feb 22, 2024
9 checks passed
@jahow jahow deleted the ME-open-edit-form branch February 22, 2024 20:58
@jahow
Copy link
Collaborator Author

jahow commented Feb 22, 2024

Thanks for the extensive review 🙂

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