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

fix(macro-prompts): preserve outer quotes #2076

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

ammmze
Copy link
Contributor

@ammmze ammmze commented Dec 10, 2024

Description

Previously if you had a macro prompt such as the following, the modal title would display Question, not "Question". However, in other projects (Klipperscreen and Fluidd), they will preserve those outer quotes and they will be included in the title. This change makes Mainsail consistent with the other implementations.

RESPOND TYPE=command MSG="action:prompt_begin \"Question\""
RESPOND TYPE=command MSG="action:prompt_button Button1|RESPOND MSG=\"Clicked it!\""
RESPOND TYPE=command MSG="action:prompt_show"

Related Tickets & Documents

Implements discussion from #2045.

Mobile & Desktop Screenshots/Recordings

Screenshot 2024-12-09 at 10 04 05 PM

[optional] Are there any post-deployment tasks we need to perform?

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 10, 2024
@ammmze
Copy link
Contributor Author

ammmze commented Dec 10, 2024

@pedrolamas If you can give this a review when you are available, that would be appreciated!

Previously if you had a macro prompt such as the following, the modal title would display `Question`, not `"Question"`. However, in other projects (Klipperscreen and Fluidd), they will preserve those outer quotes and they will be included in the title. This change makes Mainsail consistent with the other implementations.

```
RESPOND TYPE=command MSG="action:prompt_begin \"Question\""
RESPOND TYPE=command MSG="action:prompt_button Button1|RESPOND MSG=\"Clicked it!\""
RESPOND TYPE=command MSG="action:prompt_show"
```
@ammmze ammmze force-pushed the macro-prompts-preserve-quotes branch from 7ece9a4 to 14585cc Compare December 10, 2024 05:22
Copy link
Contributor

@pedrolamas pedrolamas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@meteyou meteyou changed the title feat(macro-prompts): preserve outer quotes fix(macro-prompts): preserve outer quotes Dec 10, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 10, 2024
@meteyou meteyou merged commit 7affc45 into mainsail-crew:develop Dec 10, 2024
11 checks passed
@meteyou
Copy link
Member

meteyou commented Dec 10, 2024

@ammmze thx for your PR! I just changed the title to "fix", because i think its more a fix than a feature.

@ammmze ammmze deleted the macro-prompts-preserve-quotes branch December 10, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants