Conditional visibility of button
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start by reviewing the existing BUTTON[...] syntax and button configuration, then compare them with the proposed visibleConditions and action examples. No file or test is named, and the request leaves the condition syntax open; done would require an agreed design and implementation for conditional button visibility without breaking existing button usage.
Written by the indexing model from the issue text.
Description
Please fill out these Check-boxes
- I checked for existing similar feature requests
- I have read the docs and checked that the feature I am requesting is not already implemented
- My feature request consists of only one feature
Is your Feature Request related to a Problem or Annoyance?
Allow to show/hide buttons dynamically based on conditions. I want to organize a simple workflow, an example for organizing a catalog of books to read.
| Button | Condition | Action |
|---|---|---|
| start-reading | page has tag #Book/WishList | remove tag #Book/WishList and add #Book/Reading |
| winish-reading | page has tag #Book/Reading | remove tag #Book/Reading and add #book/Readed |
| add-to-wish-list | page has not tag #Book/WishList or #Book/Reading | set tags #Book and #Book/WishList |
I have shown an example of button description below.
Describe the Feature you'd like
For exmple
visibleConditionsit's array of conditions with OR or AND conditions, maybe replace visibleConditions to hade Conditons- if
evaluate: true- value is JS and should return boolean result, for example check iftag.score > 10 - if
evaluate: false- use type: hasMetadata/hasntMetadata but it looks like the evaluate property is then redundant
label: Start Reading
icon: ""
style: default
class: ""
cssStyle: ""
backgroundImage: ""
tooltip: ""
id: book-start-reading
visibleConditions:
- type: checkMetadata
bindTarget: tags
evaluate: true
value: "x == '#Book/Wishlist"
actions:
- type: updateMetadata
bindTarget: reading_year
evaluate: false
value: "2025"
- type: updateMetadata
bindTarget: tags
evaluate: false
value: Book Book/Reading
label: Finish Reading
icon: ""
style: default
class: ""
cssStyle: ""
backgroundImage: ""
tooltip: ""
id: book-finish-reading
hidden: true
visibleConditions:
- type: hasMetadata
bindTarget: tags
value: Book
actions:
- type: updateMetadata
bindTarget: tags
evaluate: false
value: Book
- type: updateMetadata
bindTarget: finish_date
evaluate: true
value: new Date().getFullYear() + '-' +(parseInt(new Date().getMonth())<10?'0':'') +(parseInt(new Date().getMonth())+1) + '-' +((new Date().getDate())<10?'0':'')+new Date().getDate()
Button usage
BUTTON[book-start-reading, book-finish-reading]
This is just a concept, I don't claim to have the final syntax of conditions
Alternatives
No response
Additional Context
No response
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mProjectsCode/obsidian-meta-bind-plugin
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mProjectsCode/obsidian-meta-bind-plugin#669 · 2 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 62/100
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
feature request
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
bug can't reproduce
Difficulty 4/5 3-5 days Newbie friendliness 45/100
mProjectsCode/obsidian-meta-bind-plugin#667 · 9 comments ·
All issues in mProjectsCode/obsidian-meta-bind-plugin
Similar issues
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Crush Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ElementsProject/cln-application#167 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Quantco/pnpm-licenses#17 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100