-
Notifications
You must be signed in to change notification settings - Fork 211
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 filled state to dropzone component #4617
Conversation
d5defec
to
866a6a9
Compare
Tachometer resultsChromedropzone permalinktest-basic
Firefoxdropzone permalinktest-basic
|
8af217f
to
12626b7
Compare
Lighthouse scores
What is this?Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on Transfer Size
Request Count
|
5bec457
to
af18c86
Compare
@rubencarvalho Can you update the hash and pull this up to |
@@ -29,7 +29,7 @@ import { Dropzone } from '@spectrum-web-components/dropzone'; | |||
## Example | |||
|
|||
```html | |||
<sp-dropzone id="dropzone-1" style="width: 400px; height: 200px"> | |||
<sp-dropzone id="dropzone-1" style="width: 400px;"> |
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.
export const Filled = (args: StoryArgs): TemplateResult => { | ||
return html` | ||
<sp-dropzone id="dropzone" ?filled=${args.isFilled}> | ||
Filled dropzone | ||
</sp-dropzone> | ||
`; | ||
}; | ||
Filled.args = { | ||
isFilled: 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.
Probably nitpicking but can we make sure that all our stores look same? i.e., like the other stories of dropzone i'd like it to follow the same design with illustrated message and whatever else.
Also on the side since we try to (or atleast in theory we do) use the same template for all our stories to show different component states, it would be better if we can reuse the same template without rewriting the same code in stories. Not a blocker. Just wanted to get your opinion on making our codebase better.
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 is a great point, and I think we should really consider a holistic approach to this (maybe outside the scope of this PR). But let me elaborate: since we use Storybook for both component demos and VRT, we need to balance showcasing component functionality with isolating each story's features to test specific functionalities. For example, if we change the sp-action-button
or the sp-illustrated-message
, it will cause sp-dropzone
screenshots to fail. Is this acceptable? Maybe 🤷 However, ideally, we should have an additional layer of component demos that are independent of VRT so Storybook could focus solely on component testing in isolation.
I will follow-up on this.
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 is a great discussion thread! We should definitely talk more on this. Currently the storybook config are tightly coupled to docs site demos and we are tightly coupled here! We are trying to create some obfuscated demos which will cater for Desktop and Mobile versions to be represented in docs site and are independent of storybook.
This looks like a good and informative way to represent component behaviours
Also @rubencarvalho you probably need to rebase this to main and update the golden image hash once again so that ci stops getting angry. Rest everything looks great. Thanks for working on it. |
6b2389a
to
a52f23a
Compare
6e46953
to
65985ef
Compare
* feat: add filled state to dropzone component * chore: update golden images hash * chore: update dropzone controlled story to have reactivity * chore: update dropzone README to reflect interactivity * chore: update VRT hash * chore: update VRT hash
* feat: add filled state to dropzone component * chore: update golden images hash * chore: update dropzone controlled story to have reactivity * chore: update dropzone README to reflect interactivity * chore: update VRT hash * chore: update VRT hash
* feat: add filled state to dropzone component * chore: update golden images hash * chore: update dropzone controlled story to have reactivity * chore: update dropzone README to reflect interactivity * chore: update VRT hash * chore: update VRT hash
Description
There is a new design for the dropzone component when it is in a "filled state". This PR adds this functionality to the component and respective documentation.
Related issue(s)
Motivation and context
Catching up the implementation with the most up to date designs.
How has this been tested?
filled
stateisFilled
control.filled
attributeScreenshots
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.