fix(kb): declutter the article screen and fix Cancel #490
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-423-kb-article-screen-declutter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The article title row carried the rating, both badges, "Open ticket about this article", Edit, Delete and the density toggle inside OverflowActions while the right rail held only two read-only cards. Move the four actions into an "Actions" card at the top of the right rail as a full-width column, and leave the header with the breadcrumb, title, status and visibility badges, Updated, and the read-mode button. A header "..." menu renders the same ArticleActions whenever that rail is not on screen (always while it is collapsed for read mode, and below the sm breakpoint), so nothing becomes unreachable.
Hide nav-tree categories that hold no articles anywhere in their subtree. prune_empty_categories runs bottom-up over the built tree, so a parent that only holds non-empty descendants survives while an empty leaf drops. Categories stay fully visible and editable on the KB home grid, which is where create / edit / delete already live.
Restore the pointer cursor globally. Tailwind v4's preflight sets button { cursor: default } and nothing in the app compensated, so no button anywhere showed a pointer on hover. One base-layer rule in input.css covers button, [role="button"] and summary; :disabled is excluded and the existing disabled:cursor-not-allowed utilities still win because Tailwind declares the utilities layer after base.
Gate voting on the tenant having two or more users, read once per article view from GET /auth/users?per_page=1 via the Paginated meta.total. The lookup is secondary to the article fetch: a failure leaves the count unknown and hides the rating rather than rendering a broken control. When shown, the rating moves out of the header to a "Was this helpful?" row at the end of the article body.
Make Cancel mode-aware wherever one form serves both create and edit: ArticleForm, CompanyForm, ContactForm, ContractForm and QuoteEditor now cancel to the record's detail route in edit mode and keep their list route in create mode. The remaining Link-wrapped Cancel sites (assets, billing, projects, tickets, time) sit on create-only pages with no edit route in the Route enum, so a list destination is correct there. scripts/check-cancel-routes.sh pins that classification and the input.css cursor rule, and runs from just check and the Forgejo check workflow.
#MAPPS-423
The article title row carried the rating, both badges, "Open ticket about this article", Edit, Delete and the density toggle inside OverflowActions while the right rail held only two read-only cards. Move the four actions into an "Actions" card at the top of the right rail as a full-width column, and leave the header with the breadcrumb, title, status and visibility badges, Updated, and the read-mode button. A header "..." menu renders the same ArticleActions whenever that rail is not on screen (always while it is collapsed for read mode, and below the sm breakpoint), so nothing becomes unreachable. Hide nav-tree categories that hold no articles anywhere in their subtree. prune_empty_categories runs bottom-up over the built tree, so a parent that only holds non-empty descendants survives while an empty leaf drops. Categories stay fully visible and editable on the KB home grid, which is where create / edit / delete already live. Restore the pointer cursor globally. Tailwind v4's preflight sets button { cursor: default } and nothing in the app compensated, so no button anywhere showed a pointer on hover. One base-layer rule in input.css covers button, [role="button"] and summary; :disabled is excluded and the existing disabled:cursor-not-allowed utilities still win because Tailwind declares the utilities layer after base. Gate voting on the tenant having two or more users, read once per article view from GET /auth/users?per_page=1 via the Paginated meta.total. The lookup is secondary to the article fetch: a failure leaves the count unknown and hides the rating rather than rendering a broken control. When shown, the rating moves out of the header to a "Was this helpful?" row at the end of the article body. Make Cancel mode-aware wherever one form serves both create and edit: ArticleForm, CompanyForm, ContactForm, ContractForm and QuoteEditor now cancel to the record's detail route in edit mode and keep their list route in create mode. The remaining Link-wrapped Cancel sites (assets, billing, projects, tickets, time) sit on create-only pages with no edit route in the Route enum, so a list destination is correct there. scripts/check-cancel-routes.sh pins that classification and the input.css cursor rule, and runs from just check and the Forgejo check workflow. #MAPPS-423