-
Notifications
You must be signed in to change notification settings - Fork 133
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
Update Documentation on Markdown in Presentation Components #2399
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2399 +/- ##
=======================================
Coverage 48.87% 48.87%
=======================================
Files 124 124
Lines 5238 5238
Branches 1109 1109
=======================================
Hits 2560 2560
Misses 2371 2371
Partials 307 307 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yiwen101 thanks for the work!
Please do see the comments.
Also please avoid unnecessary changes to the formatting like the new lines, blank spaces and so on! I didn't highlight all of them so please do look through and see what needs to be corrected.
@@ -19,16 +19,35 @@ | |||
<div id="overview" class="lead"> | |||
|
|||
The components in this page are the core **presentational** components you may want to use. Panels and tabs can be used to **organise content sections**, while badges and boxes can **highlight small, specific pieces of information**. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this new line supports to be below? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review and bring my attention to these unnecessary change issue.
I noticed that the majority of these changes are actually done by my IDE formatter automatically on save.
I understand that these changes are redundant and will distract reviewers from the actual changes. Will disable them and manually correct existing changes manually in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Distracting changes made by formatter fixed.
Thank you for the comment again.
docs/userGuide/troubleshooting.md
Outdated
- using the `markdown` tag | ||
- using an empty line without any indentation before the markdown content | ||
|
||
<panel header="Markdown rendering (Example)" type="seamless"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use the codeAndOutput boiler plate for this part to be more consistent! :)
Also maybe can add an example of using empty line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted.
Thank you for the suggestion, requested changes made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yiwen101 thank you for the changes! Some more formatting errors and some minor nits and we should be good to go :)
As presentational components are HTML-based, you need to follow the HTML syntax when using markdown in the content of the components. | ||
More specifically, you should use either: | ||
- add a line break with no indentation before the markdown content | ||
- use the `<markdown>` or `<md>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- use the `<markdown>` or `<md>` | |
- use the `<markdown>` (block level elements) or `<md>` (inline level elements) |
docs/userGuide/syntax/boxes.md
Outdated
@@ -228,17 +236,15 @@ type | `String` | `''` | Supports: `info`, `warning`, `success`, `important`, `w | |||
theme | `String` | `''` | Supports: `primary`, `secondary`, `success`, `danger`, `warning`, `tip`, `light`, `dark` or empty for default. | |||
light | `Boolean` | `false` | Uses a light color scheme for the box. | |||
seamless | `Boolean` | `false` | Uses a seamless style for the box. If `light` is specified, this style will not be activated. | |||
no-border | `Boolean` | `false` | Removes border, except if styled by `border-color` or `border-left-color`. | |||
no-border | `Boolean` | `false` | Removes border, except if styled by `border-color` or `border-left-color`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting issue
docs/userGuide/syntax/boxes.md
Outdated
<box type="warning"> | ||
warning | ||
</box> | ||
<box type="warning"> warning </box> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting issue
docs/userGuide/syntax/panels.md
Outdated
<panel header="primary type panel" type="primary" > | ||
... | ||
</panel> | ||
<panel header="primary type panel" type="primary"> ... </panel> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting issue
docs/userGuide/syntax/panels.md
Outdated
@@ -248,6 +247,4 @@ type | `String` | `light` | The type or color scheme of the panel (single).<br>S | |||
<panel header="secondary type panel" type="secondary" minimized> | |||
... | |||
</panel> | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting issue
docs/userGuide/troubleshooting.md
Outdated
|
||
</variable> | ||
</include> | ||
<panel header="Markdown not rendered without singposting(Example)" type="seamless"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<panel header="Markdown not rendered without singposting(Example)" type="seamless"> | |
<panel header="Example of Markdown not rendered without signposting" type="seamless"> |
docs/userGuide/troubleshooting.md
Outdated
|
||
You could signpost Markdown either by: | ||
|
||
- using the `markdown`(block level elements) or `md`(inline level elements) tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- using the `markdown`(block level elements) or `md`(inline level elements) tags | |
- using the `<markdown>` (block level elements) or `<md>` (inline level elements) tags |
docs/userGuide/syntax/badges.md
Outdated
</span> | ||
|
||
<span class="badge bg-primary"> | ||
<md>**Some Markdown**</md> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry minor point but the bolding isn't obvious in the badge so maybe italics should be more obvious :)
<md>**Some Markdown**</md> | |
<md>_Some Markdown_</md> |
docs/userGuide/syntax/badges.md
Outdated
@@ -1,5 +1,19 @@ | |||
## Badges | |||
|
|||
Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example: | |
**Example:** |
docs/userGuide/syntax/badges.md
Outdated
</span> | ||
</variable> | ||
</include> | ||
You can choose from a variety of colors for your badges. You can also use the `rounded-pill` class to make the badges pill-shaped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can choose from a variety of colors for your badges. You can also use the `rounded-pill` class to make the badges pill-shaped. | |
**You can choose from a variety of colors for your badges. You can also use the `rounded-pill` class to make the badges pill-shaped.** |
Thank you so much for the meticulous review, I feel so bad forcing you pointing out so many formatting issues, especially during the CNY holiday. I have made the requested adjustment (and some other minor changes). Thank you for your reviews and help again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Don't worry about it. Just make sure you adjust your IDE settings to avoid this issue in the future - also very sad for you to have to fix this over CNY HAHHA
What is the purpose of this pull request?
Resolves #2371
**Overview of changes:
Add the rule of using markdown in presentation component in "trouble shooting" and "presentation components" section of the user doc.
Update the code example of the four presentation component
Anything you'd like to highlight/discuss:
NA
Testing instructions:
NA
Proposed commit message: (wrap lines at 72 characters)
Update user doc on markdown syntax for presentation component
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major
,r.Minor
,r.Patch
.Breaking change release note preparation (if applicable):