Skip to content

feat: add @RouteParent annotation#24444

Draft
web-padawan wants to merge 1 commit into
mainfrom
feat/route-parent-annotation
Draft

feat: add @RouteParent annotation#24444
web-padawan wants to merge 1 commit into
mainfrom
feat/route-parent-annotation

Conversation

@web-padawan
Copy link
Copy Markdown
Member

Summary

  • Adds com.vaadin.flow.router.RouteParent — a class-level annotation declaring the conceptual parent of a @Route view.
  • Consumed by external navigation components (e.g. the upcoming Breadcrumbs Flow integration) that need to walk route ancestry without inferring it from URL prefixes.
  • No existing Flow code reads the annotation yet; this change is purely additive.

Test plan

  • mvn -pl flow-server test -Dtest=RouteParentTest — 4 reflection tests pass
  • Reviewer sanity-checks the Javadoc and the @ParentLayout vs @RouteParent distinction

🤖 Generated with Claude Code

Introduces com.vaadin.flow.router.RouteParent for declaring the
conceptual parent of a @route view. Consumed by external navigation
components (e.g. breadcrumbs) that need to walk route ancestry
without inferring it from URL prefixes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Test Results

 1 422 files  +1   1 422 suites  +1   1h 20m 22s ⏱️ + 2m 33s
10 014 tests +4   9 946 ✅ +4  68 💤 ±0  0 ❌ ±0 
10 486 runs  +4  10 417 ✅ +4  69 💤 ±0  0 ❌ ±0 

Results for commit a0b458d. ± Comparison against base commit 8978c60.

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RouteParent {
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.

General question: Should RouteParent have a second or third parameter for informations like Query or Route Parameter? e.g.: Home -> Categories -> category/fruits (or category=fruits)-> Apples

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants