mirror of
https://github.com/wekan/wekan.git
synced 2026-11-26 14:45:11 -05:00
d1be2d2131714d023a22a6ffc0a94de651dc7f4e
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cff80a9d7b |
Make showing dependencies each user's own choice, and add My Dependencies.
Issue #6732: the board-header "Show dependencies" button wrote one shared board field, so one user turning the lines on or off did it for everybody, and only board admins could write that field, so a member - or anyone on a public board - who could see the board could not turn them on at all. The button is gone from the header. At the top of Member Settings are now: - Show My Dependencies - Show Board Dependencies - Import - Export Both switches are off by default and saved in the user's profile, so each user decides for themselves and anyone who can view a board may show its dependencies. Board Dependencies stay on the board's cards. They may now be edited by every role that can edit OR move cards - a Worker included - and by an assigned-only member on the cards assigned to them; one rule (models/lib/dependencyAccess.js) is applied by new server methods, by the card details, the line popup, drawing on the board, Import and the REST routes. My Dependencies are a new layer in the user's profile: each user's own lines between cards they can see, drawn dashed and seen only by them. The client cannot write them directly; only the methods, which check card access, can. Import and Export work on the open board in the Board Settings / Export formats (JSON, and SVG that re-imports). Importing Board Dependencies is offered only to roles that may edit or move cards, and every import now combines: a line already there is kept exactly as it is, and only missing lines are added - also for All Boards / Import / Dependencies, which used to overwrite an existing line's type and colour. The design is written up in docs/Features/Editor/RedStrings/Board-And-My-Dependencies.md. Tests: the role table, viewing, assigned-only scope, normalizing and combining (unit), with guards that the header toggle and every reader of the old board flag are gone and every write goes through the rule; a full-app test drives the methods as admin, Worker, read-only, assigned-only and a stranger; Playwright covers the menu order and defaults, a per-user switch that leaves another member's view alone, a read-only member's My Dependencies (dashed, unseen by the owner) with import and export, and a Worker's combining board import - in Chromium and WebKit. Header, fold and mobile guards that listed the old button are updated. 567 server tests pass. Thanks to nalilord and xet7 ! Fixes #6732. |
||
|
|
0f56a3344b |
Move an expanded list's collapse caret to its header's top corner
The caret rendered as a plain in-flow sibling before the title, which put it on the row with the card count and the +/menu icons - visually unrelated to either the title it collapses or that menu. Nesting it inside the title heading was tried first and reverted: that heading carries js-open-inlined-form/is-editable, so a click on the caret bubbled up and opened the rename form instead of collapsing the list (.tools/list1). Fixed by floating the caret to the START of the header's top content line - list.css already floats .list-header-menu (the hamburger/+ icons) to the END of that same line - so the caret lands level with that menu, at the header's top corner: the left edge for LTR, the right for RTL, from the logical float value with no extra rule needed. The collapsed state is unchanged: its caret stays a sibling before .list-rotated, absolutely positioned against .list-header as before. Thanks to xet7. |
||
|
|
f62258b5cb |
Header bar: one star group, named view menus, and a Filter button that shuts.
The bar drew TWO stars in a row - one on the starred-boards dropdown and one for the board you are on - which reads as a single control somehow drawn twice. The dropdown has no star now: it is a caret and the COUNT of starred boards, which is what it is about, and the count is shown even at zero because it is the button's only label and a bare caret says nothing about what it opens. The board's own star sits immediately beside it, and the two are wrapped in a rounded outline of their own, shaped like the phone/desktop toggle's but WHITE where that one is black: the toggle is a white box sitting on the bar, so a dark border shows against it, while these buttons sit on the bar's own colour and need a light one. Without an outline the two read as unrelated icons that happen to be adjacent - which is what made the two stars confusing in the first place. The star is its own template so the bar can place it here rather than among the board's other controls further along. A Blaze event map only sees events inside its own template, so its helpers and its click came with its markup, and the copies left behind in boardHeaderButtons are gone. The two view menus and Multi-Selection carry their name beside the icon again. I had made them icon-only earlier and xet7 asked for the words back; that is the better call - six view glyphs are six things to learn, a check-box outline says nothing about multi-selection, and a tooltip is the one place a name cannot be read without hovering. The bar wraps to a second row when it runs out of width, which is what makes the word affordable now and did not before. Sort, Search and Boards in Archive stay icons: those glyphs are well known. A label does not wrap mid-button - two lines inside a one-line button is worse than the tooltip was. Clicking Filter while the filter sidebar is already showing closes it. It only ever opened, so a second click did nothing visible and the only way back was the sidebar's own X, somewhere else on screen from the thing you just clicked. Not while a filter is ON, though: the sidebar is then the one place that says WHAT is being hidden from the board, and closing it would leave a board showing a subset of its cards with nothing on screen to say so - so it stays open, and the X beside the button is what clears the filter. "Showing the filter" is open AND on that view, because a sidebar open on Activities is not showing the filter and clicking Filter there has to switch to it rather than close the panel. models/lib/filterButton.js holds that rule so "which way does this click go" is answered once, and the guard checks all four combinations without a DOM. tests/mobileModeConsistency stopped expecting js-star-board among the board header buttons and says where it went instead; tests/headerBars pins the group, its light-against-the-bar outline, the labels, and the filter toggle. Thanks to xet7 ! |
||
|
|
0461de062f |
Board: the second header bar is gone. It was the last one.
Three things, as asked. NO DUPLICATE BOARD NAME. The second bar drew the board's title in an `h1` of its own, under the same name in the bar above it. The first bar has said it since the first step of this work; the h1 is gone. THE PENCIL IS BESIDE THE NAME. Renaming a board belongs next to the board's name, not in a bar of its own, so `boardEditTitleButton` renders immediately right of the title in the first bar. Board admins only, as before. EVERYTHING ELSE IS AN ICON, LEFT OF THE BELL. Visibility, watch, star, sort, the board's rule buttons, filter, search, dependencies and Multi-Selection, each named by a tooltip and none carrying a visible label. The bar is one row shared with the logo, the starred boards, the view menu, the bell and the user menu; ten labelled buttons do not fit at any width. The desktop/mobile duplication went with it. The old bar wrote the whole set out TWICE - `unless isMiniScreen` and `if isMiniScreen` - because a row of labelled buttons does not fit on a phone. Icons do, so one copy serves both, and the two switches that had to be kept in step are gone rather than kept in step. headerBarControls.jade is deleted. It held one Search button and one Multi-Selection button, written for this bar and All Boards'; both bars are gone now, so a template shared by nobody was indirection rather than sharing. Every route reference goes with the bar: config/router.js names no headerBar at all any more. Six guards followed, and four of them existed only to measure this bar: the title-plus-buttons row that a long board title split across two lines, the wrapper that fixed it, the phone layout, and the hamburger that shared the first row with the title. All of that was one problem, and the problem is gone with the row. Each says so where it used to measure it, rather than being deleted. Thanks to xet7 ! |
||
|
|
72315d8f96 |
Mobile mode: same bar on a phone as on a desktop, list title back, board reflows.
Reported with two screenshots of the same app: on an iPhone 12 mini the second header
bar held a handful of icons and no board title, while a desktop Firefox window in
mobile mode showed the title and the full set of buttons. Same mode, two bars.
Mobile layout is driven from three switches that did not agree: `body.mobile-mode`
(the toggle), `Utils.isMiniScreen()` (which template branch renders) and
`@media (max-width: 800px)` (the viewport - true on a phone, false on a wide desktop
window even with mobile mode on). The first two were made to agree in a5246fbf5; the
rules that assumed the third are fixed here.
`.mobile-mode .board-header-btns.left { display: none }` is removed. The left group
holds edit title / visibility / watch / star / sort, and boardHeader.jade renders them
in EXACTLY ONE of the two groups - left `unless isMiniScreen`, right `if isMiniScreen`.
So in mobile mode the left group is already empty and hiding it changes nothing,
EXCEPT when the switches disagree, and then it deletes those five buttons from the bar
with no replacement. Gone, so that if the switches ever drift again the buttons survive
instead of vanishing.
The phone block gave the bar a fixed `height: 48px` for #6419's touch targets. A fixed
height CLIPS the second row the bar wraps to when title + buttons do not fit on one -
part of the bar was simply not there. Now `min-height`, so the targets keep their size
and the bar can grow; it still sits on one row whenever the content fits, which is the
normal case.
The list title is visible in mobile mode again, on both. listHeader.jade has two
shapes: on a mini screen the `h2.list-header-name` is a direct child of `.list-header`,
otherwise it is wrapped in a div (the one that rotates when a list is collapsed).
Mobile mode lays the header out as a grid and places the title by grid row/column,
which only applies to a direct grid ITEM - inside the wrapper the placement was ignored
and the title landed in the 30px first column, squeezed to nothing. `display: contents`
drops the wrapper from the layout so the title is a grid item in both shapes. Not for
`.list-rotated`, which needs a real box to rotate, nor for the screen-reader move
buttons.
The board reflows sideways again instead of overflowing by a sliver. The mobile board
rules sized the canvas, swimlanes, lists and list headers with `100vw` - the viewport
width INCLUDING the vertical scrollbar. The canvas scrolls vertically, so every one of
those was about a scrollbar's width wider than the box it sat in, at each nesting
level, and `min-width` pinned to the same value meant it could not shrink. All 18 are
now `100%`, which resolves against the parent's content box and already excludes the
scrollbar.
Tests: 1321 passing.
Thanks to xet7 !
|