Skip to content

CAUSEWAY-3971: Switching between Layout Variants may result in Members staying hidden#3426

Merged
andi-huber merged 24 commits intomainfrom
3971-layout.switching
Mar 4, 2026
Merged

CAUSEWAY-3971: Switching between Layout Variants may result in Members staying hidden#3426
andi-huber merged 24 commits intomainfrom
3971-layout.switching

Conversation

@andi-huber
Copy link
Contributor

@andi-huber andi-huber commented Feb 24, 2026

  • Tests to verify that GridService works as expected (switch layouts and verify facet winners differ)
  • Verify layout reloading still works when PROTOTYPING
  • Verify menubars.xml reloading still works when PROTOTYPING
  • Layout export to honor layout variant?

Analysis so far:

There is only one instance of ObjectSpecification per DomainObject class. When a layout gets loaded the first time a bunch of layout related Facets within said ObjectSpecification receive an update to reflect layout data from this new layout.xml.

Those layout related facets are stateful and their state depends on the layout that was last loaded. With caching involved, loading only happens once per application lifecycle (PROD mode).

Hence, layout switching does not work as desired. Even worse, in a multi-user environment all sorts of weird layout issues might occur, not only related to member hiding.

We need qualifier support for layout related facets:

  • Object supporting Facets
  • Action supporting Facets
  • Property supporting Facets
  • Collection supporting Facets

Remaining Technical Challenges:

  • Find a proper place to store the layout variant (a String) for the current page/request.
  • Clear layout variant after the current page/request (test against AJAX requests!)
  • FacetRanking needs to honor the currently set layout variant properly.
  • Reinstate memorizing of winning facets, respecting the currently set layout variant.

Task-Url: https://issues.apache.org/jira/browse/CAUSEWAY-3971

@andi-huber andi-huber self-assigned this Feb 24, 2026
@andi-huber andi-huber added the bug label Feb 24, 2026
@andi-huber
Copy link
Contributor Author

image

@andi-huber
Copy link
Contributor Author

image

@andi-huber
Copy link
Contributor Author

andi-huber commented Feb 26, 2026

image

Modify the Facet Ranking logic, such that we can optionally find the winning Facet using a filter that only accepts a certain layout variant.

@andi-huber andi-huber force-pushed the 3971-layout.switching branch from b5bebab to 12d0503 Compare March 2, 2026 05:03
@andi-huber andi-huber force-pushed the 3971-layout.switching branch 2 times, most recently from 4e4fcf7 to c0971f6 Compare March 4, 2026 12:06
@andi-huber andi-huber force-pushed the 3971-layout.switching branch from c0971f6 to fd510f6 Compare March 4, 2026 12:06
@andi-huber andi-huber marked this pull request as ready for review March 4, 2026 13:24
@andi-huber andi-huber merged commit d736932 into main Mar 4, 2026
3 checks passed
@andi-huber andi-huber deleted the 3971-layout.switching branch March 4, 2026 13:46
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.

1 participant