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

feat: make dialogheaderfooter implement hascomponents #6494

Merged

Conversation

ugur-vaadin
Copy link
Contributor

@ugur-vaadin ugur-vaadin commented Aug 2, 2024

Description

This PR makes DialogHeaderFooter implement HasComponents. This introduces the following APIs to both DialogHeader and DialogFooter:

  • add(Collection<Component> components)
  • add(String text)
  • remove(Collection<Component> components)
  • removeAll()
  • addComponentAtIndex(int index, Component component
  • addComponentAsFirst(Component component)

NOTE:
This might be breaking if dialog.getHeader().add(null); is used anywhere since it is going to be ambiguous after the refactoring. However, this is unlikely in practice since it is not supported and would throw a NullPonterException anyway.

Fixes #5735

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/overview
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.
  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@ugur-vaadin ugur-vaadin force-pushed the feat-make-dialogheaderfooter-implement-hascomponents branch from 9cd1539 to bb77fcd Compare August 5, 2024 20:48
Copy link

sonarcloud bot commented Aug 5, 2024

@ugur-vaadin ugur-vaadin merged commit 6312d50 into main Aug 6, 2024
5 checks passed
@ugur-vaadin ugur-vaadin deleted the feat-make-dialogheaderfooter-implement-hascomponents branch August 6, 2024 07:38
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.alpha8 and is also targeting the upcoming stable 24.5.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DialogHeaderFooter should implement HasComponents
3 participants