{{ text }} diff --git a/src/eComponents/ui/__tests__/ActionButtonUIC.spec.ts b/src/eComponents/ui/__tests__/ActionButtonUIC.spec.ts index 70075587..a756a642 100644 --- a/src/eComponents/ui/__tests__/ActionButtonUIC.spec.ts +++ b/src/eComponents/ui/__tests__/ActionButtonUIC.spec.ts @@ -17,7 +17,7 @@ function mockMatchMedia(canHover: boolean) { } describe('ActionButtonUIC', () => { - it('keeps the touch inline hint from setting the host intrinsic width', () => { + it('shows the tooltip as inline copy when hover is unavailable', () => { mockMatchMedia(false) const wrapper = mount(ActionButtonUIC, { @@ -30,9 +30,7 @@ describe('ActionButtonUIC', () => { }) expect(wrapper.get('.help-hint-host').classes()).toContain('min-w-0') - expect(wrapper.get('.help-hint-host').classes()).toContain('flex') - expect(wrapper.get('.help-hint-host').classes()).not.toContain('inline-flex') - expect(wrapper.get('.help-hint-inline').classes()).toContain('w-0') - expect(wrapper.get('.help-hint-inline').classes()).toContain('min-w-full') + expect(wrapper.get('[data-testid="run-program"]').text()).toBe('Run') + expect(wrapper.get('.help-hint-inline').text()).toContain('split touch') }) }) diff --git a/src/eComponents/ui/helpHint/__tests__/HelpHintUIC.spec.ts b/src/eComponents/ui/helpHint/__tests__/HelpHintUIC.spec.ts index d5b4b20d..74c41cb6 100644 --- a/src/eComponents/ui/helpHint/__tests__/HelpHintUIC.spec.ts +++ b/src/eComponents/ui/helpHint/__tests__/HelpHintUIC.spec.ts @@ -31,8 +31,6 @@ describe('HelpHintUIC', () => { }) expect(wrapper.find('.help-hint-inline').text()).toContain('Execute block') - expect(wrapper.find('.help-hint-inline').classes()).toContain('w-0') - expect(wrapper.find('.help-hint-inline').classes()).toContain('min-w-full') expect(wrapper.find('.help-hint-popover-trigger').exists()).toBe(false) }) diff --git a/src/main.css b/src/main.css index 65590b79..73019363 100644 --- a/src/main.css +++ b/src/main.css @@ -316,13 +316,40 @@ body { } .e-widget-chrome-action { - @apply grid w-full grid-cols-[minmax(10rem,1fr)_auto] items-center gap-2 md:flex md:w-auto md:flex-row; + @apply grid w-full items-center gap-2 md:flex md:w-auto md:flex-row; + grid-template-columns: minmax(10rem, 1fr) auto; + grid-template-areas: + 'examples run' + 'hint hint'; +} + +.e-widget-chrome-action > :first-child { + grid-area: examples; + min-width: 0; } .e-widget-chrome-run { @apply min-w-0 shrink-0 max-md:[&_.e-action-button]:min-h-9 max-md:[&_.e-action-button]:px-2 max-md:[&_.e-action-button]:py-1.5 max-md:[&_.e-action-button]:text-xs; } +@media (max-width: 767px) { + .e-widget-chrome-run, + .e-widget-chrome-run .help-hint-host { + display: contents; + } + + .e-widget-chrome-run .help-hint-trigger { + grid-area: run; + } + + .e-widget-chrome-run .help-hint-inline { + grid-area: hint; + width: auto; + min-width: 0; + text-align: left; + } +} + /* --- Site shell (home, browse, card chrome) --- */ .fyp-shell-cta { @apply inline-flex items-center justify-center px-3 py-2 min-h-11 rounded-md text-sm font-medium no-underline sm:min-h-0 sm:py-1.5 sm:px-2.5;