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

add more markup to tutorial objectives prose #1412

Merged
merged 5 commits into from
Aug 15, 2023

Conversation

kostmo
Copy link
Member

@kostmo kostmo commented Aug 5, 2023

Closes #1411

@kostmo kostmo requested review from byorgey and xsebek August 5, 2023 22:30
@kostmo kostmo force-pushed the feature/more-tutorial-markup branch from b0180bb to 1faee74 Compare August 5, 2023 23:01
@kostmo kostmo marked this pull request as ready for review August 6, 2023 00:22
Copy link
Member

@xsebek xsebek left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

Just so you know putting anything in curly braces will opt out of parsing, you could even do:

Water the `flower`{=Hziulquoigmnzhah}s please.

and it would do the same thing - which is nothing, because I did not implement any extra logic for raw inlines, beyond highlighting them in descriptions.

data/scenarios/Tutorials/build.yaml Show resolved Hide resolved
data/scenarios/Tutorials/conditionals.yaml Outdated Show resolved Hide resolved
@kostmo
Copy link
Member Author

kostmo commented Aug 6, 2023

Just so you know putting anything in curly braces will opt out of parsing, you could even do:

Water the `flower`{=Hziulquoigmnzhah}s please.

and it would do the same thing - which is nothing, because I did not implement any extra logic for raw inlines, beyond highlighting them in descriptions.

It would be cool to have differentiated color coding for the various annotations
{=entity}, {=type}, and {=snippet}. And also validation that a referenced {=entity} (and {=command}) exists.

@@ -38,7 +38,7 @@ objectives:
evaluated until needed. In this case, we want to make sure
that only the correct branch is evaluated. To write a value
of type, say, `{int}`{=type}, we just surround a value of type `int`{=type}
in curly braces, like `{3}`. This is why arguments to `build`
in curly braces, like `{3}`{=snippet}. This is why arguments to `build`
Copy link
Member

Choose a reason for hiding this comment

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

Why snippet? My understanding is that plain backticks are for anything which is a valid swarm-lang expression. There are a bunch of other similar places where I think you added snippet unnecessarily. We defintely don't want to use it if we don't have to since snippets are not checked whereas plain backticks are parsed and typechecked.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, I failed to read the docs 👓 .

@xsebek
Copy link
Member

xsebek commented Aug 6, 2023

It would be cool to have differentiated color coding for the various annotations

@kostmo that is definitely the intention. 🙂 Right now, any garbage in curly braces will stop parsing and the conventions are not enforced (also not set in stone yet).

Once we have the nice ParsedCode type that @byorgey suggested in #1406 (comment), we can simply highlight each case.

@xsebek
Copy link
Member

xsebek commented Aug 12, 2023

@kostmo if you want, I can rebase this on main branch (#1413 just merged with improvements) and add more markup. 🙂

But if you want to play around I can leave it to you, should be fun with the autoplay-tutorials.sh script. 😉

@kostmo
Copy link
Member Author

kostmo commented Aug 12, 2023

@kostmo if you want, I can rebase this on main branch (#1413 just merged with improvements) and add more markup. slightly_smiling_face

Yes, please go ahead.

@xsebek xsebek force-pushed the feature/more-tutorial-markup branch from 1faee74 to 21ab251 Compare August 13, 2023 20:21
data/scenarios/Tutorials/backstory.yaml Outdated Show resolved Hide resolved
@xsebek
Copy link
Member

xsebek commented Aug 13, 2023

@kostmo it seems you were quite thorough, I only found a few tidbits. 👍

@kostmo kostmo force-pushed the feature/more-tutorial-markup branch from 68a1d77 to a516597 Compare August 15, 2023 06:53
@kostmo kostmo added the merge me Trigger the merge process of the Pull request. label Aug 15, 2023
@mergify mergify bot merged commit 0179fa6 into main Aug 15, 2023
8 checks passed
@mergify mergify bot deleted the feature/more-tutorial-markup branch August 15, 2023 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark up all entities/commands in tutorials
3 participants