Thursday, April 17, 2025
1 change · master
Code cleanup and technical improvements
The Knowledge app’s permission panel and options menu were redesigned to load more responsively and behave more consistently. Users get clearer permission controls, more predictable behavior when leaving private articles, and improved stability backed by new tests.
Original PR description
Make Knowledge feel a little bit more responsive by deferring the loading of some fields. For both the PermissionPanel and the options panel we remove as much as possible the usage of separate RPC…
Make Knowledge feel a little bit more responsive by deferring the loading of some fields. For both the PermissionPanel and the options panel we remove as much as possible the usage of separate RPC calls. This change made us rely more on the record Object populated by the DB values. Tests were also implemented for each Component to test their behavior and ensure stability and robustness for the future. There's also been some minor improvements to the behavior done. #### PermissionPanel * no more check that "based on" articles are accessible by the user (more coherent with the topbar "hierarchy"). * when the owner of a private article leaves the article, the article is sent to the trash instead of archiving it (as suggested by the confirmation dialog). * portal users with permission "none" are not hidden anymore. * the permission selectors are now dropdowns (more flexible than selectors and has a style that is consistent with the app). * the "remove member" button has been replaced by an option in the permission dropdown. #### Member rights escalation * Allow a member to remove itself from an article if its member permission is the same as the inherited_permission. i.e. a read access member on a readonly article can remove itself: - this allows an action symmetry (a user can join a readonly article and also remove itself as a member to see/hide it in the sidebar) #### OptionsDropdown * The bootstrap dropdown has been replaced by a separate Component that uses the Dropdown class provided by the framework. * The bus system for toggling each panel has been replaced by a reactive object in the environment provided by the Controller. This doesn't rely on d-none class on the parent any more to hide/show each panel. Task-4273102