Skip to content
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

[BUG] Some list-*-draggable should not accept everything dragged #8598

Open
Leilei332 opened this issue Sep 14, 2024 · 1 comment
Open

[BUG] Some list-*-draggable should not accept everything dragged #8598

Leilei332 opened this issue Sep 14, 2024 · 1 comment

Comments

@Leilei332
Copy link
Contributor

Describe the bug

Create a tiddler with the following content:

<$button dragFilter="one [[two three]] four"/>

Open the Control panel and navigate to Appearance, Toolbars, View Toolbar. Drag the button to it, three items appear with checkbox checked. The tiddler one, two three and four is created and tagged $:/tags/ViewToolbar.

Expected behavior

Although it may be convenitent to create customed toolbar buttons, I think some draggable list is used only to adjust the order of the items. IMO the draggable list should only accept tiddlers limited to a second filter (like the View Toolbar page with [tag[$:/tags/ViewToolbar]] so that only tiddlers tagged the tag can be accepted) to prevent dangerous usage (like dragging TableOfContents tag to the View Toolbar page in tiddlywiki.com).

To Reproduce

No response

Screenshots

No response

TiddlyWiki Configuration

5.3.6-prerelease

Additional context

No response

@pmario
Copy link
Member

pmario commented Sep 14, 2024

So you are talking about a new parameter eg: accept, which expects a filter that is evaluated with every incoming tiddler. If it returns a "non empty" value the tiddler is accepted.

@Jermolene -- what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants