-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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-infra] Fix bug on API prop copy experience #39707
Conversation
Netlify deploy previewhttps://deploy-preview-39707--material-ui.netlify.app/ Bundle size report |
8713114
to
3502fc5
Compare
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.
I'm actually up for keeping the copying behavior — at least in my case, when I click on a heading/prop anchor, I want to copy the URL. I wonder, though, if there's a need/opportunity to improve the copying affordance.
Stripe, for example, displays a "Copied" text after clicking, which communicates better what happened. But, it doesn't necessarily explain it before clicking what will happen 🤔
@danilo-leal Maybe it comes to a matter of preferences, why I think it's better UX overall not to have it:
A side note: it's inconsistent right now. It's only the API props that have this behavior and not all the headers in the docs. |
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.
Uhm... I see. I think the biggest problem right now is — as you stated — "the surprise" factor. There shouldn't be any when interacting with stuff. I understand how clicking on the anchor icon button doesn't communicate that the URL is copied with it, which was what I mentioned above about the "lack of affordance". Stripe communicates what happens after you click it, but not before—and we're not doing both.
With that said, alright, let's remove it from now and I can add an issue about "more easily copying the heading URL" so we can figure out one alternative solution that possibly doesn't involve using the same button for two things (which is usually not the best approach, anyway). 🤙
@danilo-leal I could get behind Stripe's behavior, meaning implementing this for all headers and with a post-notification for affordance. It's only that I expect that I would personally enjoy it more without copy. But I also didn't research this much more than what I shared before, so #suggestion. |
A new benchmark: https://platform.openai.com/docs/guides/prompt-engineering/split-complex-tasks-into-simpler-subtasks, in the same "class" as https://developers.google.com/maps/documentation/javascript/maptypes. They never change the anchor in the URL. I'm not sure how it feels. It makes me dubious that it actually work, the first thing I want to try is open a new window to check that the link does work 🤔 |
Yeah... Open AI's docs are weird in that sense because it's similar to Stripe's, where the icon doesn't necessarily mean that the URL will be copied, but then the scroll position + URL is not changed at all. Maybe a good place is one where, by hovering a heading, you see two icon buttons: one for anchoring and another for copying the URL. |
I have noticed this while I was looking at #39704:
⬇️
The simplest solution seems to remove this behavior. If we really want to keep it, we would need to use
clipboard-copy
instead.