-
Notifications
You must be signed in to change notification settings - Fork 579
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
[ENH] Oqtane ControlPanel component forces edit button unto page #4883
Comments
This is not a bug... the Control Panel component has had this behavior since version 1.0 (ie. since 2020). If a developer does not like the default behavior of the Control Panel component, they have always had the flexibility to create their own custom Control Panel component. The ability to hide the Edit Mode toggle can certainly be added as an enhancement to the existing Control Panel component - as long as the default value is False (so that it does not affect existing installations). |
@sbwalker sounds good, I'll commit some code. What would you like for a property name - just so I don't use a different naming convention? |
There is already a ShowLanguageSwitcher property so I would suggest a ShowEditMode property (default to True). However please be very careful when adding this enhancement so that the current behavior is not affected. The EditMode button is more complex than it appears as it supports both static and interactive render modes, is displayed based on a number of different business rules, and is also used as part of page personalization (ie. the ability to create a custom page for an individual user). |
…hiding the Edit Mode toggle button
Summary
TestsHere are the test cases for each combination of user type and render variation: Group 1: Default Themes Preserving Existing BehaviorTest Case 1
Test Case 2
Test Case 3
Test Case 4
Test Case 5
Test Case 6
Test Case 7
Test Case 8
Test Case 9
Test Case 10
Test Case 11
Test Case 12
Group 2: Test Themes Showing New Behavior with
|
Oqtane Info
Version - 5.x up to 6.0
Render Mode - all
Interactivity - Server
Database - SQL Server
Describe the bug
The razor component
ControlPanel
should be responsible for making the control panel available.But it also forces a visible edit button unto the page, which is not desirable, because this makes it impossible to create your own.
Here's an example: in both cases there is a customized toolbar (custom languages, custom buttons) but the forced edit still appears (languages could be disabled).
Expected Behavior
Either
ShowEditToggle
parameter (just likeShowLanguageSwitcher
) to allow not having that buttonMy recommendation would be to keep concerns separate, and not combine these controls. But because I assume "the ship has sailed" we should probably just add the toggle.
Anything else?
I would be happy to contribute the fix, but must be sure that it would be accepted, and that the naming for this Parameter is according to your expectations.
The text was updated successfully, but these errors were encountered: