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

Massive improvements to UI/UX and Wiki Content tree sidebar #103

Open
wants to merge 30 commits into
base: dev
Choose a base branch
from

Conversation

imfx77
Copy link

@imfx77 imfx77 commented Nov 3, 2024

All Submissions:

  • Have you updated the ChangeLog with your proposed changes?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you updated the getPluginVersion() in Plugin.php and Makefile version appropriately?

New Feature Submissions:

It's all in the ChangeLog and the commit messages, but long story short:

  • Massive improvements to UI/UX.

  • Fully reworked, functional and beautiful Wiki Content hierarchy, in a resizable sidebar.

  • Implemented purging of Wiki Editions .

  • For the rest, please, reffer the ChangeLog, it's a huuuge entry.

  • Have you added an explanation of what your changes do and why you'd like us to include them?

Description

As I promised some time ago, after I finished and released my TodoNotes plugin, I dug into Wiki to make it more useful by means of rearrangeable hierarchy of wiki pages. It got implemented a while ago, but it was still very basic and very buggy, and frankly I still considered it unusable.

So, took me some time to dive into the code and to get aquainted with the Wiki plugin.

Well, it's a sad fact that it needs a MAJOR refactoring and cleanup, in any possible aspect. It was NOT the goal of my changes, yet I had to do quite some of it on demand and on the go. Given that my intended changes are totally massive, this additional amount of rework, bugfixes, styling, cleanup, code rearrangement and occasional optimisations, makes it almost impossible to review the PR in a sensible manner.

Sorry about that ;/

Probably it would be a better approach to evaluate it by extensive testing. I have done lots of it, on all my desktop browsers and on my mobile devices, with light and dark themes, in landscape and portrait. On the backend I use KB as a Docker image on my Synology and deploy everything directly to it on the fly.

Another thing that would show better than words what have been proposed in this PR are some screenshots. Please, find them below, HTH.

Just note that the DarkTrasparent theme is not a part of the plugin changes, it is just my favorite shade to use. On your side things will look a bit different depending on your settings.

Ok, will leave you some time to take a look and consider some actions. But I would recommend to just try it in some sandbox like Docker and experience it for yourself👍

image
image
image
image
image
image
image
image

* adjusted all titles of pages to show the project name
* removed obsolete references to 'wiki:wiki/sidebar' template in WikiController
… in a sidebar when showing wiki page details and editions

* the sidebar is also horizontally resizable now
* the original KB styles for sidebar/container/content replace the inline hardcoded clearfix styles
* adjusting styles for wiki content list items
…ller' using a minimalistic notation corresponding to actions and parameters

* removed the totally unnecessary 'wikipage_id' and 'project_id' parameters for file controller URLs
…ully preloaded) for the 'editions' and 'wiki listing' pages that show multiple rows with versions/pages at once

* making sure the sidebar layout for detail/editions takes the whole screen width
…fault detail page (wiki_id=0) that will show the first root wiki page

* extracted preparing the wiki pages tree in a separate method as it gets reused in several places
…ki related pages

* reworked title and header for the 'index' wiki page
* removed the redundant menu template for the 'index' wiki page
* added an explicit search button (e.g. for mobile)
* fixed styles for full width
* changed the 'renderChildren' helper method and its references in unit tests
…ree - only highlight the name link

* renamed the `columns` element to the more descriptive `wikitree`
* removing duplicated code from wikitree sidebar in favor of reusing `renderChildren` helper
…tons for the wikitree branches

* adjustments to branch fold/unfold buttons and icons, and edit/delete buttons aligned to right
 * using it for the wiki overview and for the parent page dropdown in editing wiki page modal dialog
 * fixed the bug that a wiki page could assign a parent from its own subtree, thus effectively and irreversibly breaking the wiki page hierarchy
# Conflicts:
#	Template/wiki/detail.php
…edit/delete

* adjusting colors and positioning for links in the detail wiki template
* adjusting clear style for all main containers
…ent_id` parameter that was not used properly to obtain sublists

* added a collapsable list of subpages in the detail wiki page template
* now getting proper sublists with reduced indent for the wiki overview page and the detail wiki page template
…a placeholder for better visualization where the dragged wikipage will be moved

* added an explicit handle to drag wikipages in wikitree for mobile + fixed the `jquery-sortable` lib to properly handle touches and mobile drag
* fixed the base `wikitree` <ul> to contain an initial <li> item so to be able to rearrange root wikipages and their mutual subpages + added empty <ul> to the leaves of the wikitree, so to allow dragging subitems into them
* added a fictive `(root)` branch to wikitree for better visual and dragging experience
* the default wiki view and clicking on `(root)` now show a fully expanded standalone wikitree view
* fixed `updatepage` and `createpage` in WikiModel to force a `ordercolumn = GetLastOrderPosition() + 1` when moving a page from one parent to another
…in WikiModel, in order to correctly handle all reordering cases, a bit of optimization and code simplification

* unit test touched appropriately
* finally a fully and correctly functioning reordering of wikitree sortable by drag & drop, taking care to reload the page to refresh changes in the hierarchy of the wiki pages
* checking for actual changes when creating editions
* fixed routes for restore/purge editions
* reworked restore/purge buttons for editions
* adjusted indent of lines for the wikitree
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

Helper/WikiHelper.php Show resolved Hide resolved
@alfredbuehler
Copy link
Collaborator

Thanks for this impressive work! 👍

@imfx77
Copy link
Author

imfx77 commented Nov 16, 2024

anyone looking into this?
what are the chances of merging it?
soon ... or ever?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants