-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: add spec pattern modal #19801
feat: add spec pattern modal #19801
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ FlakinessThis comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
one question but looks great!
packages/app/src/specs/SpecsList.vue
Outdated
@spec-pattern="bindingsOpen = true" | ||
/> | ||
<SpecPatternModal | ||
v-if="props.gql.currentProject && bindingsOpen" |
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.
Should we combine the v-if
and :show
? It looks like they do same thing (conditionally hide/show?)
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 think they have different purposes here. It might be better to make the v-if depend just on props.gql.currentProject
so that the SpecPatternModal component renders only once, when there is a currentProject
, and keep bindingsOpen
to only manage the open/closed state. With the current v-if we add/remove the component from the DOM, at the same time as we are opening and closing the modal.
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.
@marktnoonan I'll implement what you've stated above, and also rename some variables as bindingsOpen
was a copy and paste and it should be named more contextually.
LGTM, I will leave merging to @ZachJW34 - might be good to re-run CI, just to see if it's flake or real fails. |
@lmiller1990 thanks for the review. There is a PR that was going to clash with this one that was a higher priority so I'm letting this sit until it's merged and I'll fix it up |
2f1f7cc
to
96b6473
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.
Works great. I see some alignment issues in a couple of components when I look at them on my machine, but not sure they come from this PR.
One comment on an accessibility update you could make with the button, but I'm in a similar part of the code in my next PR so happy to make it then and get this merged if you like.
<span | ||
class="block border-l h-24px px-16px border-l-gray-100 group-hover:border-none" | ||
> | ||
{{ resultCount }} {{ resultCount === 1 ? t('specPage.matchSingular') : t('specPage.matchPlural') }} |
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.
{{ resultCount }} {{ resultCount === 1 ? t('specPage.matchSingular') : t('specPage.matchPlural') }} | |
{{ resultCount }} {{ resultCount === 1 ? t('specPage.matchSingular') : t('specPage.matchPlural') }} | |
<span class="sr-only">{{ t(`createSpec.viewSpecPatternButton`) }} </span> |
If we add an sr-only
span here, it will give the button a useful label for screen readers, and we can replace .get('[data-cy="open-spec-pattern-modal"]')
with something like cy.contains('button', 'View spec pattern')
in tests.
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.
Updated! I noticed alignment issues as well but they disappeared and I can't reproduce them. Could have been a new class that wasn't picked up if yarn dev
was still running?
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.
that sounds right!
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.
in azure there was a status Approved with comments... that is what I want here.
Not perfect but should go in.
<SpecPatternModal | ||
v-if="props.gql.currentProject" | ||
:show="showSpecPatternModal" | ||
:gql="props.gql.currentProject" | ||
@close="showSpecPatternModal = false" | ||
/> |
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 like this should be added to the top component.
Then the trigger would be through a global store variable.
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.
less repetition for something that global
* 10.0-release: (25 commits) fix(unify): improve dev server config ergonomics (#19957) feat: add spec pattern modal (#19801) fix: Windows e2e project scaffolding issues (#19938) feat: update @cypress/schematic to use proper e2e config for 10.0.0 (#19827) fix: correctly migrate projects with custom integration folder (#19929) fix: component spec creation with spec pattern (#19862) fix: missed committing yarn.lock after merge conflict fix: correct reference branch / commitSha in performance-reporter (#19941) feat: update navbar UI per Figma (#19926) fix: seed examples files when no e2e directory is created (#19768) chore: remove windy lightBlue warning test: component test updates (#19925) feat: Focus browser from select browser screen and on dashboard login (#19842) test: Honeycomb system-test reporter (#19855) fix(deps): update dependency engine.io to v5.2.1 [security] feat: Retain fileName when working with aliased fixtures and files (#19820) Update release-process.md Update release-process.md Update release-process.md Update release-process.md ...
User facing changelog
Clicking the "Matches" indicator on the spec list brings up spec pattern modal
Additional details
Also updates the styles of the indicator now that it is actionable.
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?