-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
./.glitch-assets:271885/382
./.glitch-assets:271885/772
./watch.json:708175/554 ./lib/toggle.js:708175/20 ./.eslintrc.js:708175/104 ./.eslintrc.json:708175/3418 ./lib/avatar.js:708175/68 ./package.json:708175/625
…rence page where the Popover example stole focus on page load
we should be using it in user-options-pop (ln 166). does this change mean it works now, or is there a change we need to do on the community side to get it functioning properly? |
lib/popover.js
Outdated
| /* there's a good chance this isn't the right default, but it maintains backwards compatability with the community site, | ||
| from a time when Popover was not actually respecting startOpen and was passing true through to the underlying PopoverContainer | ||
| all the time */ | ||
| startOpen: true, |
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 a bit worried about this... since most popovers shouldn't startOpen. If this starts working as intended, will we suddenly have an open popover nightmare site?
Granted that's also something we can probably test locally before updating the package version in prod, right?
|
Updated to remove my introduction of a bug-fix-that-doesn't-fix-anything-but-maybe-breaks-stuff in the Popover component. I thought we were using the community-specific Popover in user-options-pop in Community, but @whimsicallyson pointed out I was wrong on that. We were passing in Still working on testing these changes- the instructions in contributing.md aren't working for me :( |
whimsicallyson
left a comment
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.
addressed all my concerns! let me know if you want any 🦆for trying to get it working locally, I haven't tried but am happy to bounce ideas off
|
@whimsicallyson and I both tested this as a pre-release on staging; it works! Deploying now |
|
🚀 PR was released in |
tl;dr: Things in this PR:
Why did this happen
The linting configuration we were previously using in shared components either excludes some important rules, or was failing silently. I learned this because I shipped a version of shared-components that has a bug that the linter should have caught.
I wasn't excited about playing whack-a-mole to figure out additional useful rules that weren't included in
eslint-config-react-app, so instead I switched the config to extendingeslint:recommended,plugin:jsx-a11y/recommended, andplugin:react/recommended. This is more in line with what the community site does for linting. (The community site also adds theairbnbeslint config, which is more opinionated.)Popover bug
Linting fixes revealed a bug! This is the dream of linters everywhere.edited to say:
I was largely wrong about there being a bug in the Popover component; we were passing one prop to something that was just a styled
divthat didn't take props, which I thought was a bug affecting behavior, but it was not affecting behavior at all. (see edit history of this description for more details on what I was thinking)resume non-edited content
Also, since the Popover story example was using
startOpen=true, when you load shared-components.glitch.me, the Delete Team element that is the popover example immediately receives focus. In addition to fixing the bug, the example now hasstartOpen={false}so you can load shared-components.glitch.me and see the top of the page.Linting fixes for new rules
Server side linting
Got instructions from Osmose on enabling server-side linting in the glitch editor. It appears to be working!
.eslintrc.json, not.eslintrc.js.