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

Rewrite tree mode toggling to Stimulus controller #6527

Merged
merged 10 commits into from Nov 22, 2023

Conversation

aschempp
Copy link
Member

@aschempp aschempp commented Nov 14, 2023

This replaces our legacy toggleStructure and toggleFileTree to a universal Stimulus controller that implements the behaviour for both drivers. Additionally, it makes setting global operations optional because they can now be generated automatically. Might want to refactor this into a separate PR though. (see #6528)

This changes the following behaviour:

  • DC_Folder previously started with level 1 while DC_Table starts a tree at level 0. This has no been unified (always start at 0). It only affects DC_Folder::ajaxTreeView() argument, so I doubt this will be an issue.
  • The old code manually tried to replace the ref (referrer ID) in the URL with the current value. Because our framework generated a new referer ID on every request. It now keeps the current referer ID for ajax requests (if ref is given in the request).

@aschempp aschempp added this to the 5.3 milestone Nov 14, 2023
@aschempp aschempp requested a review from a team November 14, 2023 15:46
@aschempp aschempp self-assigned this Nov 14, 2023
leofeyer pushed a commit that referenced this pull request Nov 14, 2023
Description
-----------

extracted for #6527

Commits
-------

addc518 Automatically generate the global operations
leofeyer pushed a commit to contao/core-bundle that referenced this pull request Nov 14, 2023
Description
-----------

extracted for contao/contao#6527

Commits
-------

addc5183 Automatically generate the global operations
@leofeyer leofeyer merged commit 6d4c1e6 into contao:5.x Nov 22, 2023
16 checks passed
@leofeyer
Copy link
Member

Thank you @aschempp.

@aschempp aschempp deleted the feature/toggle-structure branch November 23, 2023 07:40
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.

None yet

2 participants