-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 Feedback widget #13550
Docs Feedback widget #13550
Conversation
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.
This looks great, love the emoji animations! 😻
I didn't look at the code much (lacking skills + time), but I have one request: Can we use the design tokens from utils/presets
, e.g. use colors.gatsby
instead of rebeccapurple
, and do the same for margin and padding (space
), box-shadow, border-radius, font-size etc.? 🙏
I'm happy to do so myself, but won't be able to fit that in today.
Also — I know those tokens lack documentation, planning on adding that this week. :/
There’s more to do, but this is a start… - remove `font-family: sans-serif` along the way - remove components/feedback-widget/presets in favor of utils/presets.breakpoints
I won't manage "Use design tokens (2/2)" today anymore and blocking a merge would be silly. Happy to follow up tomorrow on the token stuff!
For people who want to try it - here's preview https://5cc089e52d11ebeccaf8db72--gatsby-org-pieh-previews.netlify.com/docs/ (just a note - it doesn't contain changes made in last 2 commits by Flo and Greg) |
- chose to reduce the border around the „emoji toggle buttons“ from 3 to 1px - add horizontal margin for screens below desktop/lg
Just pushed the missing design tokens stuff and fixed layout for screens below @greglobinski I had to do some gymnastics for smaller screens/max-width, and changed the Here's how it looks now: |
@fk Looking good, thank you |
I know we have the
instead of:
|
Actually, there is a hidden question mark for screen readers
so we can show it if we want. |
Adding a visible question mark in the button text makes sense to me. We should also factor this widget in to the docs internationalization effort–would we hide it for other languages? Or collect feedback and get it translated? |
What about such a solution? We always show a while mark at the end of the question, but instead of the Question mark icon we show a Chat icon? |
Ooh, I like that! I think using a chat/message icon solves the problem very well. |
☝️☝️☝️ |
What exactly are you asking about? |
The "poor" icon in this screenshots is shiftet down and not visible |
@muescha Ok, that's the intentional |
` | ||
|
||
export const focusStyle = css` | ||
box-shadow: 0 0 0 0.12rem ${colors.accent}; |
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.
This focus style still isn't working in Safari. I played around with it a bit and opted to change it to use outline
and outline-offset
instead:
outline: 2px solid ${colors.accent};
outline-offset: -2px;
This is ready to go now! The only issue I ran into was if you hit the enter key on the smiley radio buttons, it wouldn't go through the submit flow....it would cancel and reset back to the widget toggle button instead. I was able to fix it by adding Also tested it on Windows, and it works great with NVDA, Firefox, and Chrome. Edge was decent but it gets the radio buttons wrong by only announcing "1 of 1" for each instead of "1 of 3", etc. Given they're moving to Chromium I opted to leave that as-is without digging in more. |
Where i can find the server side code repo for the mutation |
@muescha the API source is here. It won't run without setting up a Prisma instance, though — take a look at the |
This is ready to go, assuming the form endpoint works. @jlengstorf if you think we need to test that more fully I could use some detailed instructions. Otherwise I think this is ready to merge! |
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.
🎉
It works now that I have the API endpoint set up locally (thanks @jlengstorf!). Excited to start collecting data! |
Yay! 🎉 |
Description
Introducing a feedback widget to the docs section, with code integrated from @jlengstorf's feedback widget repo. We want to make it easy to collect feedback about docs from users in the moment, and by creating our own widget we will control the data (as opposed to a third-party service).
This PR adds two new dependencies for managing state:
xstate
@xstate/react
It would be super cool to add some tests for this, primarily to assert focus management in after view changes so we know they continue to work. Hopefully I'll get some time to work on that...but I didn't want to hold up reviewing of this in the meantime.
TODO:
Test with NVDA on IE11 and Firefox. The master branch is currently failing to build for me so I can't test it with Parallels.