| 46b58c59 | 15-Sep-2023 |
Keith Kurak <[email protected]> |
[docs] separate copy and link icons on headers/ collapsibles (#24448)
# Why
A follow-up to https://github.com/expo/expo/pull/24293 based on feedback
from @brentvatne . The goal is to create more c
[docs] separate copy and link icons on headers/ collapsibles (#24448)
# Why
A follow-up to https://github.com/expo/expo/pull/24293 based on feedback
from @brentvatne . The goal is to create more consistency and clarity
between the anchor link and copy anchor link functionality on both
headers and collapsibles.
**UPDATE**: After talking with Brent, I removed the copy functionality,
the idea being that, now that clicking the link icon everywhere gets you
an updated URL, it's easy enough to copy. So, this really just updates
collapsibles and removes copy functionality from the headings. I left
the icon switch in there in case there was some appeal to that, since
the link icon seemed to be a one-off.
# How (old)
There's a few ways to slice this, but this approach is to try separating
the functionality into two icons. I've definitely seen this elsewhere,
can't remember where tho.
<img width="419" alt="image"
src="https://github.com/expo/expo/assets/8053974/19917dd5-eeae-4bcd-9152-242608fbf39c">
<img width="554" alt="image"
src="https://github.com/expo/expo/assets/8053974/12164972-6728-4e08-b993-2d3c38026ba4">
Now we have consistent rules for both headers and collapsibles:
- the link icon always navigates to the anchor tag on click
- the copy icon always copies the anchor tag on click (and __only__
copies, no updating of the URL here!)
Additionally, we now have better copy feedback:
<img width="301" alt="image"
src="https://github.com/expo/expo/assets/8053974/2587ad54-bd3f-4977-9361-97092ef8f3c6">
<img width="301" alt="image"
src="https://github.com/expo/expo/assets/8053974/946fae82-c6bf-4225-a097-3836e95b028d">
Design notes:
- I removed the arrow from the tooltip since, if the heading is at the
top of the page, the tooltip moves below the icon, but the arrow still
points down
- I didn't see a copy icon in the docs, noticed it seemed like a lot of
other icons were going in the styleguide direction, so I switched both
icons to styleguide. I have no idea how to see all the icons, so I'm not
sure if this is the best of the like 20 different link icons.
## Special collapsible stuff
- Unlike a heading, where you can click anywhere and navigate to the
anchor tag, you have to click the link icon in order to navigate anchor
tag here. This is so you can expand the collapsible without also
scrolling the page.
- If you click the link icon and the collapsible is closed, it will
expand the collapsible as well as updating the URL. However, if the
collapsible is already open, clicking the link icon will not close it.
Thus, clicking the link icon will always leave you in the same state as
if you copied the URL with anchor tag and opened it in another tab.
- The copy icon also expands the collapsible but will not close it.
# Test Plan
- [x] clicking on header text updates URL with anchor tag
- [x] Headers: clicking on link icon updates URL with anchor tag
~~- [x] Headers: clicking on copy icon copies URL (doesn't navigate)~~
- [x] Collapsibles: clicking on header expands/ collapses section ONLY
- [x] Collapsibles: clicking on link expands and navigates
~~- [x] Collapsibles: clicking on copy expands and copies (doesn't
navigate)~~
~~- [x] Collapsibles: clicking on link or copy when already opened
doesn't close~~
~~- [x] Copy tooltip: updates to "Copied!" on click~~
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
show more ...
|
| 215a1323 | 17-Jul-2023 |
Evan Bacon <[email protected]> |
chore(docs): integrate config plugins doc (#23560)
# Why
The original doc was a large markdown file that we brought over. This PR
aims to integrate the doc better with the Expo docs by using bui
chore(docs): integrate config plugins doc (#23560)
# Why
The original doc was a large markdown file that we brought over. This PR
aims to integrate the doc better with the Expo docs by using built-in
components.
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->
# How
Added the ability to pass a note to the `FileTree` and replaced the
markdown blocks with `FileTree`s.
## Before
<img width="662" alt="Screenshot 2023-07-16 at 8 43 09 PM"
src="https://github.com/expo/expo/assets/9664363/923ed351-e66a-40c5-a1d3-553c1f9e14e0">
## After
I'm not especially in love with this, but it is better than the code
block.
<img width="670" alt="Screenshot 2023-07-16 at 8 42 57 PM"
src="https://github.com/expo/expo/assets/9664363/df5e8106-ea10-4540-ab7b-c51a4eee228d">
On smaller screens, the note will scroll instead of wrap.
<img width="505" alt="Screenshot 2023-07-16 at 8 48 51 PM"
src="https://github.com/expo/expo/assets/9664363/9ec54840-4765-4c5a-9e4a-f3e60d58d2b6">
show more ...
|