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

docs: Add UNSAFE documentation to mobile Button and Text #2392

Merged
merged 13 commits into from
Feb 24, 2025

Conversation

taylorvnoj
Copy link
Contributor

@taylorvnoj taylorvnoj commented Feb 21, 2025

Motivations

Recently we added UNSAFE_ props to mobile Text & Button.

UNSAFE_ was going to be used by a team and was somewhat time sensitive, so I committed to updating docs as a fast follow, to get the feature out the door.

Changes

Added

  • New Text Implement tab with UNSAFE_ info
  • UNSAFE_ info to the pre-existing Button Implement tab

Testing

Make sure you see UNSAFE_ info in the Implement tab for Button & Text.

Changes can be
tested via Pre-release


In Atlantis we use Github's built in pull request reviews.

Random photo of Atlantis

@taylorvnoj taylorvnoj self-assigned this Feb 21, 2025
Copy link

cloudflare-workers-and-pages bot commented Feb 21, 2025

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 794c005
Status: ✅  Deploy successful!
Preview URL: https://8e8b3efe.atlantis.pages.dev
Branch Preview URL: https://taylor-docs-for-unsafe.atlantis.pages.dev

View logs

Copy link

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: d463e1c
Status:⚡️  Build in progress...

View logs

Copy link

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 171cb51
Status: ✅  Deploy successful!
Preview URL: https://ae6c297f.atlantis.pages.dev
Branch Preview URL: https://taylor-docs-for-unsafe.atlantis.pages.dev

View logs

Copy link

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: c975ab4
Status: ✅  Deploy successful!
Preview URL: https://d54410d5.atlantis.pages.dev
Branch Preview URL: https://taylor-docs-for-unsafe.atlantis.pages.dev

View logs

Copy link

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: d463e1c
Status: ✅  Deploy successful!
Preview URL: https://529b74e7.atlantis.pages.dev
Branch Preview URL: https://taylor-docs-for-unsafe.atlantis.pages.dev

View logs

Copy link

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: f57feaa
Status:⚡️  Build in progress...

View logs

Copy link

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: f57feaa
Status: ✅  Deploy successful!
Preview URL: https://b291b67b.atlantis.pages.dev
Branch Preview URL: https://taylor-docs-for-unsafe.atlantis.pages.dev

View logs

@@ -199,17 +199,3 @@ provided.
<Canvas>
<Text size="small">What is this, a font for 🐜s?</Text>
</Canvas>

## Platform Considerations (Mobile)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now in TextNotes.mdx

@@ -81,7 +81,7 @@ interface CommonButtonProps {
/**
* **Use at your own risk:** Custom style for specific elements. This should only be used as a
* **last resort**. Using this may result in unexpected side effects.
* More information [here](https://atlantis.getjobber.com/storybook/?path=/docs/guides-customizing-components--docs#unsafe_-props).
* More information in the Customizing components Guide.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

decided to do this instead of:

  • Linking back to Storybook
  • Links don't show up in the prop table on new docs anyway

@taylorvnoj taylorvnoj marked this pull request as ready for review February 21, 2025 04:53
@taylorvnoj taylorvnoj requested a review from a team as a code owner February 21, 2025 04:53
@@ -81,7 +81,7 @@ interface CommonButtonProps {
/**
* **Use at your own risk:** Custom style for specific elements. This should only be used as a
* **last resort**. Using this may result in unexpected side effects.
* More information [here](https://atlantis.getjobber.com/storybook/?path=/docs/guides-customizing-components--docs#unsafe_-props).
* More information in the Customizing components Guide.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would still be valuable to add the link in case the doc is viewed in Storybook.

Suggested change
* More information in the Customizing components Guide.
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).

However, a more general question, should I be seeing UNSAFE_ prop docs on component pages on the new site? Because I don't see them for Button or Text on the new docs site.
image

Copy link
Contributor Author

@taylorvnoj taylorvnoj Feb 24, 2025

Choose a reason for hiding this comment

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

Ok that's fair - I brought the links back in Text and Button (and Popover)

It's strange you don't see the UNSAFE_ props, because they are on prod (since these props were added previous to this PR)
Screenshot 2025-02-24 at 3 02 28 PM

and here it is on local:
Screenshot 2025-02-24 at 3 03 40 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be visible only in "Mobile" tab?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup - since UNSAFE is only in the Text and Button mobile components right now, it'll only be visible in the mobile tab

Copy link
Contributor

@nad182 nad182 left a comment

Choose a reason for hiding this comment

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

A small suggestion to still include the links (in case the docs are viewed in Storybook) as well as a typo fix suggestion.

@@ -48,7 +48,7 @@ export interface PopoverProps {
/**
* **Use at your own risk:** Custom style for specific elements. This should only be used as a
* **last resort**. Using this may result in unexpected side effects.
* More information [here](https://atlantis.getjobber.com/storybook/?path=/docs/guides-customizing-components--docs#unsafe_-props).
* More information in the Customizing components Guide.
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps, a link here and on line 40?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here f1c32aa

@@ -37,7 +37,7 @@ export interface PopoverProps {
/**
* **Use at your own risk:** Custom class names for specific elements. This should only be used as a
* **last resort**. Using this may result in unexpected side effects.
* More information [here](https://atlantis.getjobber.com/storybook/?path=/docs/guides-customizing-components--docs#unsafe_-props).
* More information in the Customizing components Guide.
Copy link
Contributor

Choose a reason for hiding this comment

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

This 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.

Done here 794c005

Copy link
Contributor

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

@taylorvnoj taylorvnoj merged commit a53fc34 into master Feb 24, 2025
12 checks passed
@taylorvnoj taylorvnoj deleted the TAYLOR/docs-for-unsafe branch February 24, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants