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

refactor: update events based on web component event changes #6660

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

ugur-vaadin
Copy link
Contributor

@ugur-vaadin ugur-vaadin commented Sep 20, 2024

Description

This PR updates the events based on the changes in web component events.

Removed API:

  • Dashboard.addItemReorderStartListener
  • Dashboard.addItemResizeStartListener

Renamed API:

  • Dashboard.addItemReorderEndListener-> Dashboard.addItemMovedListener
  • Dashboard.addItemResizeEndListener-> Dashboard.addItemResizedListener

Updated API for events:

  • DashboardItemMovedEvent
    • Component getItem(): Returns the moved item
    • List<Component> getItems(): Returns the root level items of the dashboard
    • Optional<DashboardSection> getSection(): Returns the section that contains the moved item, or an empty optional if the item is a direct child of the dashboard
  • DashboardItemRemovedEvent
    • Component getItem(): Returns the removed item
    • List<Component> getItems(): Returns the root level items of the dashboard
  • DashboardItemResizedEvent
    • DashboardWidget getItem(): Returns the resized widget
    • List<Component> getItems(): Returns the root level items of the dashboard

Part of vaadin/platform#6626

Type of change

Refactor

@ugur-vaadin ugur-vaadin changed the base branch from feat/dashboard-reordered-event-getters to feat/dashboard September 23, 2024 15:56
@ugur-vaadin ugur-vaadin merged commit 7dd8102 into feat/dashboard Sep 24, 2024
1 check passed
@ugur-vaadin ugur-vaadin deleted the feat/dashboard-events-update branch September 24, 2024 06:46
Copy link

sonarcloud bot commented Sep 24, 2024

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.

2 participants