mirror of
https://github.com/we-promise/sure.git
synced 2026-09-03 05:41:18 +00:00
* feat(icons): add search field for icon selection * fix(icons): address review suggestions on the icon picker * fix(goals): prevent the icon picker popover from collapsing `updatePopupPosition` sets `bottom: 0px` when the popover would run past the fold, but never clears Tailwind's `top-full`. With both offsets set and `height: auto`, CSS derives the height from the offsets instead of the content, collapsing the popover to 26px. This PR is what makes it reachable: the search row (42px plus an 8px gap) and the grid going max-h-40 -> max-h-52 grow the popover ~98px, moving the overflow trigger point far enough to hit standalone /goals/new at 1280x800. `h-fit` makes the height non-auto, so the over-constraint resolves by ignoring `bottom`, which is why categories, already carrying it, was never affected.
14 lines
490 B
Ruby
14 lines
490 B
Ruby
class IconPickerComponentPreview < ViewComponent::Preview
|
|
# @display container_classes max-w-[400px]
|
|
def default
|
|
render_with_template(locals: { icons: Category.icon_codes })
|
|
end
|
|
|
|
# A short list, to show the "no matching icons" empty state on any
|
|
# search term that isn't one of these.
|
|
# @display container_classes max-w-[400px]
|
|
def few_icons
|
|
render_with_template(template: "icon_picker_component_preview/default", locals: { icons: %w[pizza coffee wrench] })
|
|
end
|
|
end
|