dialog --builder json generation doesn't contain messageposition key
Describe the bug
When using dialog --builder to work on generating a custom dialog prompt, the optional argument messageposition is not included within the generated json body that's created on request.
To Reproduce Steps to reproduce the behavior:
- Run
dialog --builder - Enter a bunch of text into the Message field, under Content
- Click JSON output, and generate. Take snip of output.
- Go back to the content pane, and toggle the "vertical position" on, changing nothing else.
- Then again click on the JSON output, generate, and compare the snip with the new JSON.
Whilst the message text position will have moved in the dialog window, the json shouldn't have changed and will be missing the messageposition key
Expected behavior
The json contains the messageposition key
Desktop (please complete the following information):
- macOS version 15.1, and 15.0.1
- swiftDialog version 2.5.1 and 2.5.2
Additional context
https://github.com/swiftDialog/swiftDialog/wiki/Customising-the-Message-area#message-positioning
This part of the wiki could also be updated - at the moment it is unclear which key (messagealignment or messageposition) refers to horizontal, or vertical positioning.
Whilst the wiki contains both keys, they're not in their respective order for how they work, and could be misunderstood to be messagealignment being vertical alignment, instead of horizontal alignment.
--builder is still in alpha state and really hasn't been updated since the first release of v2.0. There's a lot more about it that is incomplete or has broken since the feature was added. (including the notice in app that the feature is alpha. it is noted on the wiki though https://github.com/swiftDialog/swiftDialog/wiki/Builder )
current plan is to scrap the code a re-write.
FYI: You can use builder in conjunction with command line options.
I used /usr/local/bin/dialog --messageposition bottom --builder and when I had Builder show the json it included that key.
Thanks Bart, I’d missed that page
If you want to close this, I’ve no qualms with that. Or if you wanted to tag as documentation ref the points under additional context, works for me too.
@BigMacAdmin - thanks for the hot tip, I’ll check it out! I noticed this when trying to create some parameters for a new dialog I’m trying to craft I’ll share in slack if/when I can get there. ideally I’d love to fork this repo and build it into a new argument for the community to use, just need to learn ~~a bit more~~ Swift first!