Repository navigation
fix: board index and list 500 on a Tabler-only ux_icon host - #66
Merged
Merged
Conversation
New board passed the bare name `plus`, which the kit prefixes with `bi:` under ux_icon. The list's filter fold passed the kinds chevron_up and chevron_down, whose ux_icon default is Bootstrap. Both now ask for Tabler there. Removing the icon alone would lose the plus: a toolbar action draws its kind's icon only when action_icons maps the kind. A host that maps create or the chevrons keeps its own icon, and webfont output does not change. The new functional test renders the pages with a ux_icon that throws on any name not prefixed tabler:.
rector process removes the (string) cast on the array key as useless, which brings back the all-digit id bug of 2.0.1. The check reads the id from the item, as in db9cd2e, with its test and fixture. TaskBoardSyncService takes rector's non-static failure(), which the rector dry-run gate needs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch for 2.0.2. Audit status: pending short delta.
Bug
On a host with
nowo_ui_kit.icon_set: ux_iconthat imports Tabler only, the board index answers 500:Icon "bi:plus" not found. The list page does the same withbi:chevron-up, which was not in the original report. The demo does not use ux_icon, so nothing caught either.Fix
tabler:plusunder ux_icon,pluson other sets, and no icon when the host mapsaction_icons.create, so the kit draws the host's icon._action.html.twig, a toolbar action draws its kind's icon only whenaction_iconsmaps the kind. With no map and no icon it is text only, so the plus would disappear on default hosts. Forcingicon_textis no answer either: the kit's ux_icon default forcreateisbi:plus-lg, the same 500.tabler:chevron-upandtabler:chevron-downunder ux_icon, unless the host maps those kinds.db9cd2ewith its test and fixture, becauserector processremoves the cast and brings back the all-digit id bug.TaskBoardSyncServicetakes rector's non-staticfailure(), which the dry-run gate needs.Behaviour for hosts
tabler:plus,tabler:chevron-upandtabler:chevron-down, or map the kinds.action_icons.create: New board now shows that icon, not the bundle's plus.Test
UxIconHostTestrenders the 2.0.0 pages with aux_iconstub that throws on any name not prefixedtabler:. Four of its five tests fail without the fix. It also checks a mapped host and both webfont hosts.Not covered by the fix: a host that sets
board.default_columns[].iconto a bare name (the option is not validated) still getsbi:<name>under ux_icon.