mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Playwright failed "custom fields panel opens from card details" in all three browsers, and it was the app, not the guard. Everything about custom fields moved to the hamburger at the end of the card's own Custom Fields heading - the picker of which fields are on this card, a pencil each, and "Add custom field" - and the card menu's entry, the Board Settings row and the wrapper popup went with it. But the heading was drawn only `if customFieldsWD`, the card's own custom-field VALUES. So the one way in existed only once you were already through it. A card with no custom field had no heading and therefore no hamburger; a board that had never used them had no way anywhere, since the sidebar view that still holds the create/edit forms is opened by nothing. The chicken-and-egg was invisible on any board that already had a field, which is every board a developer tests on, and was caught by a seeded board that had none. The heading is now drawn for every card its reader may write to - `canModifyCard`, the same condition the rest of the editable card uses. The FIELDS below still come from `customFieldsWD`, so a card with none shows an empty section rather than a phantom row per board definition, and a reader who may not write sees no heading at all. `a.js-custom-fields` went too. The move took away its label text and left the tag: an empty anchor that rendered nothing, could not be clicked, and had two `'click .js-custom-fields'` handlers still bound to it in cardDetails.js. All three are gone, and `CardPage.openCustomFields` clicks the hamburger that is the real entry point. tests/customFieldsSectionMenu.test.cjs gains the two that would have caught this: the heading is gated on who may write rather than on what the card already has, and no empty anchor or orphaned handler is left behind. Its five existing assertions - including that the three old places stay gone - still pass. Thanks to xet7 !