Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test: parameter description contains Markdown#94

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 3 commits intocoder:mainfrommtojek:5931-description-markdown
Feb 7, 2023

Conversation

mtojek
Copy link
Member

@mtojekmtojek commentedFeb 7, 2023
edited
Loading

Related:coder/coder#5931

This PR improves tests to present that the Markdown format is acceptable for the parameter description.

This PR introduces a new Markdown property to render rich descriptions, with Markdown tags included (see example).

Comment:
I admit that I wanted to use thedescription and then strip Markdown tags from descriptions in CLI, but when I looked at thelogic required to perform this (rewritten to Go), I decided to KISS and use a dedicated property, that is only processed by the site.

@mtojekmtojek self-assigned thisFeb 7, 2023
@mtojekmtojek marked this pull request as ready for reviewFebruary 7, 2023 13:38
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

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

I'm leaning towards optimizing syntax for the web interface rather than the CLI, because it's presently unclear in the syntax whendescription would be shown and whendescription_markdown would be.

What do you think about makingdescription markdown by default, then add adescription_plaintext for the CLI? Another option is to display the markdown as text in the CLI, which I don't think is bad. Markdown is pretty readable anyways (I think this might be my preference actually).

@mtojek
Copy link
MemberAuthor

Thanks for jumping in,@kylecarbs.

I'm leaning towards optimizing syntax for the web interface rather than the CLI, because it's presently unclear in the syntax when description would be shown and when description_markdown would be.

TIL! I think that we have to highlight who is the more important consumer, CLI or site. We can use it as the rule of thumb that in our case it's always the site.

What do you think about making description markdown by default, then add a description_plaintext for the CLI?

If we're site-oriented, thendescription should be kept as is, even if it uses Markdown tags. Additionally, we can expose an extra generated field in the API that shows the rendered description,description_plaintext. I don't think that this is something we need to keep in the database, it can be rendered dynamically 👍 .

Let me know your thoughts.

@kylecarbs
Copy link
Member

That makes sense to me. I like it!

mtojek reacted with thumbs up emoji

@mtojekmtojek closed thisFeb 7, 2023
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 7, 2023
@mtojekmtojek reopened thisFeb 7, 2023
@mtojek
Copy link
MemberAuthor

Maybe I will update examples to show that Markdown description is fine.

@mtojekmtojek changed the titlefeat: Add description_markdown property to rich parametertest: parameter description contains MarkdownFeb 7, 2023
@mtojekmtojek requested a review frommafredriFebruary 7, 2023 14:41
@mtojekmtojek merged commit66d82c9 intocoder:mainFeb 7, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@kylecarbskylecarbskylecarbs left review comments

@mafredrimafredrimafredri approved these changes

Assignees

@mtojekmtojek

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@mtojek@kylecarbs@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp