Skip to content

DEV: adds matchTriggerWidth/matchTriggerMinWidth d-menu #34128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 8, 2025

Conversation

jjaffeux
Copy link
Contributor

@jjaffeux jjaffeux commented Aug 7, 2025

The @matchTriggerWidth and @matchTriggerMinWidth options have been added on <DMenu /> to give more control on the size of the content. They will allow to respectively set the width and minWidth of the content. This is useful if you want your trigger to have the same width than your content for example.

It defaults to false.

Usage:

<DMenu @label="a long label" @matchTriggerWidth={{true}}>content</DMenu>

<DMenu @label="a long label" @matchTriggerMinWidth={{true}}>content</DMenu>

Also changes FilterNavigationMenu to use this.

jjaffeux and others added 4 commits August 7, 2025 10:44
The `@matchTriggerWidth` and `@matchTriggerMinWidth` options have been added on `<DMenu />` to give more control on the size of the content. They will allow to respectively set the width and minWidth of the content. This is useful if you want your trigger to have the same width than your content for example.

It defaults to false

Usage:

```gjs
<DMenu @Label="a long label" @matchTriggerWidth={{true}} style="width:200px;">content</DMenu>

<DMenu @Label="a long label" @matchTriggerMinWidth={{true}} style="width:200px;">content</DMenu>
```
@martin-brennan martin-brennan merged commit 16be391 into main Aug 8, 2025
16 checks passed
@martin-brennan martin-brennan deleted the match-trigger branch August 8, 2025 02:15
pento pushed a commit that referenced this pull request Aug 11, 2025
The `@matchTriggerWidth` and `@matchTriggerMinWidth` options have been
added on `<DMenu />` to give more control on the size of the content.
They will allow to respectively set the width and minWidth of the
content. This is useful if you want your trigger to have the same width
than your content for example.

It defaults to false.

Usage:

```gjs
<DMenu @Label="a long label" @matchTriggerWidth={{true}}>content</DMenu>

<DMenu @Label="a long label" @matchTriggerMinWidth={{true}}>content</DMenu>
```

Also changes `FilterNavigationMenu` to use this.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants