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

chore(Portal): allow links in property table types and correct link font size #4488

Merged
merged 4 commits into from
Feb 4, 2025

Conversation

snorrekim
Copy link
Contributor

@snorrekim snorrekim commented Jan 22, 2025

  • Make link in inline-code have same font-size
  • Make it possible to use link markdown in types
  • Other: create a structure that makes it easy to have different styling for primitive types in the future

Copy link

vercel bot commented Jan 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 11:48am

Copy link

codesandbox-ci bot commented Jan 22, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@snorrekim
Copy link
Contributor Author

snorrekim commented Jan 22, 2025

The idea with the new colors is that any type that isn't a primitive should have a different color. Making them more noticeable.

Primitive types are boolean, number, bigint, string andsymbol as well as any array of them like string[] or Array<number>

Comparison to see what I mean:
image

edit: removed object from list and updated screenshot

@snorrekim snorrekim force-pushed the chore/portal-properties-format branch from 62c35e5 to 780fafe Compare January 22, 2025 14:57
@snorrekim
Copy link
Contributor Author

snorrekim commented Jan 22, 2025

And here's an example of how allowing link markdown in types can be useful:
image

The "Step Item" links to it's documentation further below.

@snorrekim snorrekim marked this pull request as ready for review January 22, 2025 16:05
@snorrekim snorrekim requested a review from tujoworker January 22, 2025 16:05
@snorrekim
Copy link
Contributor Author

snorrekim commented Jan 23, 2025

object should probably also be purple. Like function it doesn't tell the full story. (and it isn't technically a primitive type)

I updated the screenshot above with object as purple

Copy link
Contributor

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

The pull request title, chore(Portal): allow links in types and make primitive types purple doesn't seem to align with a statement in the PR description Make non-primitive types purple. Should primitive or non-primitive types be purple? 🤔
Consider updating either description or title 🙏

In the code, I see const colorPrimitive = 'var(--color-success-green)' so primitive types is green and not purple, right? 💭

@snorrekim
Copy link
Contributor Author

Looks good to me :)

The pull request title, chore(Portal): allow links in types and make primitive types purple doesn't seem to align with a statement in the PR description Make non-primitive types purple. Should primitive or non-primitive types be purple? 🤔 Consider updating either description or title 🙏

In the code, I see const colorPrimitive = 'var(--color-success-green)' so primitive types is green and not purple, right? 💭

Right, the title is wrong, I'll fix it. Primitive types should be green. I'm also going to add false and true to the list of primitives.

@snorrekim snorrekim changed the title chore(Portal): allow links in types and make primitive types purple chore(Portal): allow links in types and make non-primitive types purple Jan 24, 2025
Copy link
Member

@tujoworker tujoworker left a comment

Choose a reason for hiding this comment

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

I believe the property name plays a much more important role during the process of scanning and consuming the documentation. However, the use of colors can be distracting and take away from effectively focusing on the content.

I think we should evaluate other ways to communicate primitives, if it is important to distinguish them.

@snorrekim
Copy link
Contributor Author

Changed the primitives color back to green for now to finish the PR. The option is still there for the future.

Copy link
Member

@tujoworker tujoworker left a comment

Choose a reason for hiding this comment

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

Nice 👏 Thank you for this 🎉

@tujoworker tujoworker changed the title chore(Portal): allow links in types and make non-primitive types purple chore(Portal): allow links in property table types and make non-primitive types purple Feb 4, 2025
@snorrekim snorrekim changed the title chore(Portal): allow links in property table types and make non-primitive types purple chore(Portal): allow links in property table types and correct link font size Feb 4, 2025
@snorrekim snorrekim merged commit c475b02 into main Feb 4, 2025
10 checks passed
@snorrekim snorrekim deleted the chore/portal-properties-format branch February 4, 2025 14:34
@tujoworker
Copy link
Member

🎉 This PR is included in version 10.63.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants