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: add refresh flag to navigation event #15324

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

caalador
Copy link
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
@@ -30,6 +30,7 @@
public class AfterNavigationEvent extends EventObject {

private final LocationChangeEvent event;
private final boolean refreshEvent;
Copy link
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
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
Copy link

github-actions bot commented Nov 30, 2022

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
Copy link

sonarqubecloud bot commented Dec 1, 2022

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
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 <[email protected]>
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 <[email protected]>
@vaadin-bot
Copy link
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