{"action":"created","issue":{"url":"https://api.github.com/repos/mavoweb/mavo/issues/303","repository_url":"https://api.github.com/repos/mavoweb/mavo","labels_url":"https://api.github.com/repos/mavoweb/mavo/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/mavoweb/mavo/issues/303/comments","events_url":"https://api.github.com/repos/mavoweb/mavo/issues/303/events","html_url":"https://github.com/mavoweb/mavo/issues/303","id":274989287,"number":303,"title":"Syntax of mv-bar","user":{"login":"LeaVerou","id":175836,"avatar_url":"https://avatars1.githubusercontent.com/u/175836?v=4","gravatar_id":"","url":"https://api.github.com/users/LeaVerou","html_url":"https://github.com/LeaVerou","followers_url":"https://api.github.com/users/LeaVerou/followers","following_url":"https://api.github.com/users/LeaVerou/following{/other_user}","gists_url":"https://api.github.com/users/LeaVerou/gists{/gist_id}","starred_url":"https://api.github.com/users/LeaVerou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeaVerou/subscriptions","organizations_url":"https://api.github.com/users/LeaVerou/orgs","repos_url":"https://api.github.com/users/LeaVerou/repos","events_url":"https://api.github.com/users/LeaVerou/events{/privacy}","received_events_url":"https://api.github.com/users/LeaVerou/received_events","type":"User","site_admin":false},"labels":[{"id":577432034,"url":"https://api.github.com/repos/mavoweb/mavo/labels/discussion","name":"discussion","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mavoweb/mavo/milestones/8","html_url":"https://github.com/mavoweb/mavo/milestone/8","labels_url":"https://api.github.com/repos/mavoweb/mavo/milestones/8/labels","id":2923196,"number":8,"title":"v0.1.5","description":"","creator":{"login":"LeaVerou","id":175836,"avatar_url":"https://avatars1.githubusercontent.com/u/175836?v=4","gravatar_id":"","url":"https://api.github.com/users/LeaVerou","html_url":"https://github.com/LeaVerou","followers_url":"https://api.github.com/users/LeaVerou/followers","following_url":"https://api.github.com/users/LeaVerou/following{/other_user}","gists_url":"https://api.github.com/users/LeaVerou/gists{/gist_id}","starred_url":"https://api.github.com/users/LeaVerou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeaVerou/subscriptions","organizations_url":"https://api.github.com/users/LeaVerou/orgs","repos_url":"https://api.github.com/users/LeaVerou/repos","events_url":"https://api.github.com/users/LeaVerou/events{/privacy}","received_events_url":"https://api.github.com/users/LeaVerou/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":13,"state":"open","created_at":"2017-11-19T23:58:19Z","updated_at":"2017-11-20T22:29:04Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2017-11-17T20:36:13Z","updated_at":"2017-11-20T23:45:24Z","closed_at":null,"author_association":"OWNER","body":"Right now [`mv-bar`](https://mavo.io/docs/ui/#bar) accepts identifiers of three kinds:\r\n\r\n- **Absolute** identifiers: this means the toolbar is restricted to these buttons ONLY, in that order. Example: `mv-bar=\"edit save\"`\r\n- **Relative** identifiers of two kinds:\r\n  - Negative ones: The toolbar has whatever buttons it normally would have **except** these. Example: `mv-bar=\"no-login\"`\r\n  - Positive ones: The toolbar has whatever buttons it normally would have **plus** these. Mainly useful for optional buttons. Example: `mv-bar=\"yes-export\"`.\r\n\r\nAs you can see, while `no-foo` is nice and readable, `yes-foo` is super weird. Other options would be `add-foo`, but that conflicts with adding collection items. I'm thinking of switching to `+` and `-` for relative identifiers. However, that means the difference from absolute ones is much less visible. Compare:\r\n\r\n```html\r\nmv-bar=\"no-save yes-clear yes-export no-login\"\r\n```\r\n\r\nand\r\n\r\n```html\r\nmv-bar=\"-save +clear +export -login\"\r\n```\r\n\r\nAnother drawback of the current syntax is that it would look super awkward with button names that **actually** start with `no-` or `yes-`.\r\n\r\nThoughts? Perhaps you can think of a better, completely different syntax?\r\n\r\n[Poll on Twitter](https://twitter.com/mavoweb/status/931636215761301507)"},"comment":{"url":"https://api.github.com/repos/mavoweb/mavo/issues/comments/345868923","html_url":"https://github.com/mavoweb/mavo/issues/303#issuecomment-345868923","issue_url":"https://api.github.com/repos/mavoweb/mavo/issues/303","id":345868923,"user":{"login":"LeaVerou","id":175836,"avatar_url":"https://avatars1.githubusercontent.com/u/175836?v=4","gravatar_id":"","url":"https://api.github.com/users/LeaVerou","html_url":"https://github.com/LeaVerou","followers_url":"https://api.github.com/users/LeaVerou/followers","following_url":"https://api.github.com/users/LeaVerou/following{/other_user}","gists_url":"https://api.github.com/users/LeaVerou/gists{/gist_id}","starred_url":"https://api.github.com/users/LeaVerou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeaVerou/subscriptions","organizations_url":"https://api.github.com/users/LeaVerou/orgs","repos_url":"https://api.github.com/users/LeaVerou/repos","events_url":"https://api.github.com/users/LeaVerou/events{/privacy}","received_events_url":"https://api.github.com/users/LeaVerou/received_events","type":"User","site_admin":false},"created_at":"2017-11-20T23:45:24Z","updated_at":"2017-11-20T23:45:24Z","author_association":"OWNER","body":"@kosirm I’m a bit confused. Firstly, `mv-bar` is an attribute, not a function.\r\n\r\n> mv-bar\t-all standard buttons in standard order\r\n\r\nYou don't need to specify the attribute at all for that.\r\n\r\n> If you want to customize the mv-bar you have to specify the buttons in the order that you want to have them\r\n\r\nYou mean relative values should not be possible? So users should be aware of every button and list it if they just want to not have a login button? What happens if Mavo adds a new button in the future? This seems contrary to the needs of pretty much every other user I've talked to.\r\n\r\nIn any case, if you never want relative values, you can just always specify \"only\" and it what I'm proposing works exactly as you described... The fact that there's **also** a relative syntax supported shouldn't be an issue if you don't need it, right?"}}
{"actor":{"display_login":"LeaVerou"}}