Skip to content

feat: add refresh flag to navigation event - #15324

Merged
mcollovati merged 2 commits into
masterfrom
issues/14999-events-for-refresh
Dec 1, 2022
Merged

mcollovati merged 2 commits into
masterfrom
issues/14999-events-for-refresh

Conversation

@caalador

Copy link
Copy Markdown
Contributor

Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to diustinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999

Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to diustinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999
public class AfterNavigationEvent extends EventObject {

private final LocationChangeEvent event;
private final boolean refreshEvent;

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.

Instead of adding another type, could / should the NavigationTrigge be extended with a refresh enum and used?

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.

@github-actions

github-actions Bot commented Nov 30, 2022 •

Copy link
Copy Markdown
Contributor

Test Results

   939 files  ±  0     939 suites  ±0   52m 52s ⏱️ + 2m 36s
5 931 tests +  1  5 886 ✔️ +  2  45 💤  - 1  0 ❌ ±0 
6 194 runs  +12  6 142 ✔️ +13  52 💤  - 1  0 ❌ ±0 

Results for commit 2c9ffe2. ± Comparison against base commit f92f4b7.

♻️ This comment has been updated with latest results.

@caalador
caalador force-pushed the issues/14999-events-for-refresh branch from 262d8a2 to 2c9ffe2 Compare December 1, 2022 06:10
@vaadin-bot vaadin-bot added +1.0.0 and removed +0.0.1 labels Dec 1, 2022
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2022

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 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mcollovati
mcollovati merged commit 8f95af2 into master Dec 1, 2022
@mcollovati
mcollovati deleted the issues/14999-events-for-refresh branch December 1, 2022 07:23
vaadin-bot pushed a commit that referenced this pull request Dec 1, 2022
Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to distinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999
vaadin-bot pushed a commit that referenced this pull request Dec 1, 2022
Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to distinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999
@vaadin-bot

Copy link
Copy Markdown
Collaborator

Hi @caalador and @mcollovati, when i performed cherry-pick to this commit to 2.8, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick 8f95af2
error: could not apply 8f95af2... feat: add refresh flag to navigation event (#15324)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

caalador added a commit that referenced this pull request Dec 1, 2022
Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to distinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999
mcollovati pushed a commit that referenced this pull request Dec 1, 2022
Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to distinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999
mcollovati pushed a commit that referenced this pull request Dec 1, 2022
Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to distinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999

Co-authored-by: caalador <mikael.grankvist@vaadin.com>
mcollovati pushed a commit that referenced this pull request Dec 1, 2022
Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to distinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999

Co-authored-by: caalador <mikael.grankvist@vaadin.com>
@vaadin-bot

Copy link
Copy Markdown
Collaborator

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

MarcinVaadin pushed a commit that referenced this pull request Dec 21, 2022
Add the isRefreshEvent to BeforeEnterEvent
and AfterNavigationEvent to be make it possible
to distinguish if the event is for a refresh of
a preserve on refresh view.

Fixes #14999
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.

PiT 23.3: PreserveOnRefresh does not work in master-detail views

4 participants