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

Update Documentation on Markdown in Presentation Components #2399

Merged
merged 21 commits into from
Feb 12, 2024

Conversation

yiwen101
Copy link
Contributor

@yiwen101 yiwen101 commented Feb 3, 2024

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

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: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

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):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

Copy link

codecov bot commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a265c73) 48.87% compared to head (ac5e734) 48.87%.

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.
📢 Have feedback on the report? Share it here.

@yiwen101 yiwen101 changed the title Update user doc Update Documentation on Markdown in Presentation Components Feb 3, 2024
Copy link
Contributor

@yucheng11122017 yucheng11122017 left a 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**.

Copy link
Contributor

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? :)

Copy link
Contributor Author

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.

Copy link
Contributor Author

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/components/presentation.md Outdated Show resolved Hide resolved
docs/userGuide/components/presentation.md Outdated Show resolved Hide resolved
docs/userGuide/components/presentation.md Outdated Show resolved Hide resolved
docs/userGuide/syntax/badges.md Outdated Show resolved Hide resolved
docs/userGuide/syntax/boxes.md Outdated Show resolved Hide resolved
- using the `markdown` tag
- using an empty line without any indentation before the markdown content

<panel header="Markdown rendering (Example)" type="seamless">
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@yiwen101 yiwen101 marked this pull request as draft February 10, 2024 03:33
@yiwen101 yiwen101 marked this pull request as ready for review February 10, 2024 05:48
Copy link
Contributor

@yucheng11122017 yucheng11122017 left a 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>`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- use the `<markdown>` or `<md>`
- use the `<markdown>` (block level elements) or `<md>` (inline level elements)

@@ -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`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting issue

<box type="warning">
warning
</box>
<box type="warning"> warning </box>
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting issue

<panel header="primary type panel" type="primary" >
...
</panel>
<panel header="primary type panel" type="primary"> ... </panel>
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting issue

@@ -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>


Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting issue


</variable>
</include>
<panel header="Markdown not rendered without singposting(Example)" type="seamless">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<panel header="Markdown not rendered without singposting(Example)" type="seamless">
<panel header="Example of Markdown not rendered without signposting" type="seamless">


You could signpost Markdown either by:

- using the `markdown`(block level elements) or `md`(inline level elements) tags
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- using the `markdown`(block level elements) or `md`(inline level elements) tags
- using the `<markdown>` (block level elements) or `<md>` (inline level elements) tags

</span>

<span class="badge bg-primary">
<md>**Some Markdown**</md>
Copy link
Contributor

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 :)

Suggested change
<md>**Some Markdown**</md>
<md>_Some Markdown_</md>

@@ -1,5 +1,19 @@
## Badges

Example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Example:
**Example:**

</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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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.**

@yiwen101 yiwen101 marked this pull request as draft February 11, 2024 03:36
@yiwen101
Copy link
Contributor Author

Hi @yiwen101 thank you for the changes! Some more formatting errors and some minor nits and we should be good to go :)

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.

@yiwen101 yiwen101 marked this pull request as ready for review February 11, 2024 03:54
Copy link
Contributor

@yucheng11122017 yucheng11122017 left a 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

@yiwen101 yiwen101 merged commit 220cde2 into MarkBind:master Feb 12, 2024
8 checks passed
@yucheng11122017 yucheng11122017 added the r.Patch Version resolver: increment by 0.0.1 label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r.Patch Version resolver: increment by 0.0.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icons in 'Presentation' components (e.g. box, panels, tabs) are not rendered properly
2 participants