Skip to content

feat: Add modality helpers - #13026

Merged
anssit merged 2 commits into
masterfrom
issues/12992_check_modality
Feb 16, 2022
Merged

anssit merged 2 commits into
masterfrom
issues/12992_check_modality

Conversation

@caalador

Copy link
Copy Markdown
Contributor

Add methods to check if there is a
modal component set and to add
component to current modal component.

Fixes #12992

Add methods to check if there is a
modal component set and to add
component to current modal component.

Fixes #12992
@caalador
caalador requested review from anssit and joheriks February 15, 2022 09:30
*
* @return {@code true} if a modal component has been set
*/
public boolean hasModal() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe this could also be called hasModalComponent to give a bit more context as UI contains a lot of things, and to be consistent with addToModalComponent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

if (activeModalComponent instanceof HasComponents) {
((HasComponents) activeModalComponent).add(component);
} else {
activeModalComponent.getElement()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

NULL_DEREFERENCE: object activeModalComponent last assigned on line 1317 could be null and is dereferenced at line 1321.
(at-me in a reply with help or ignore)

@github-actions

Copy link
Copy Markdown
Contributor

Unit Test Results

   935 files  ±  0     935 suites  ±0   37m 0s ⏱️ +20s
6 095 tests +  3  6 045 ✔️ +  4  50 💤 ±0  0 ❌ ±0 
6 289 runs  +12  6 233 ✔️ +10  56 💤 +3  0 ❌ ±0 

Results for commit 9524e20. ± Comparison against base commit d650205.

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 93 Code Smells

No Coverage information No Coverage information
0.2% 0.2% Duplication

@anssit
anssit merged commit 5c5a9f4 into master Feb 16, 2022
@anssit
anssit deleted the issues/12992_check_modality branch February 16, 2022 12:46
vaadin-bot pushed a commit that referenced this pull request Feb 16, 2022
Add methods to check if there is a
modal component set and to add
component to current modal component.

Fixes #12992
joheriks pushed a commit that referenced this pull request Feb 16, 2022
Add methods to check if there is a
modal component set and to add
component to current modal component.

Fixes #12992

Co-authored-by: caalador <mikael.grankvist@vaadin.com>
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.

Make it possible to check server-side modality status

4 participants