Comments (10)
The golden.png
files are stored in Google Cloud Storage and visible publicly via this URL:
https://storage.googleapis.com/screenshot-uploads/<path>/<to>/<file>.html/<golden-screenshot-hash>.golden.png
where <golden-screenshot-hash>
is found in the golden.json file, and <path>/<to>/<file>
is the path to the HTML file relative to the /test/screenshot
folder.
Check out the newly updated screenshot tests doc for more details!
from material-components-web-react.
@bmihelac we originally had them checked in, but Git will actually keep each image in its history if it detects a file change. As we commit new images, we actually increase the repo size even if the photos are not physically there.
We realize it would be ideal to have them committed would make screenshot testing easier, but we also foresee our Github repo becoming unmanageable. Do you have any suggestions to solve this issue?
from material-components-web-react.
@moog16 I am not familiar what would be best practices regarding this. I came across looking trying to fill another issue.
from material-components-web-react.
What about zipping the screenshots and including them via Git LFS? This way the repo would stay small and manageable while including the versioned screenshots.
from material-components-web-react.
@schliflo I hadn't heard of LFS...it looks promising. I'm going to look into it. Its not high on the priority list right now since it is working, but it would enable the OSS to run the tests which would be awesome.
from material-components-web-react.
@schliflo have you used LFS before? Would you be able to show us what that would look like in code?
from material-components-web-react.
@moog16 I've made an example repo with some LFS tracked files in a different branch: https://github.com/schliflo/lfs-demo
These files are only downloaded when checking out the branch containing the LFS references - which I guess is ideal for the reference screenshots.
To implement this for the screenshots here you have to remove *.golden.png
from .gitignore
, run git lfs install
, git lfs track "*.golden.png"
, git add ./**/*.golden.png
and check with git lfs ls-files
if the correct files are tracked via LFS before committing them.
from material-components-web-react.
The intention of LFS is to store the binary files completely separate from the repository (typically even on a remote server), and only store text pointers within the repository. Storing the files on another branch is defeating the point of Git LFS, as the binary files would still be in the main repository, leading to the bloat issue which Matt referenced.
from material-components-web-react.
@kfranqueiro storing the files in another branch was just for demo purposes -> repo size stays small, even though big files are in there (or referenced via LFS). To solve the issue here, the references would of course be stored in the master branch. The big benefit would be that updating these references would not bloat the repo as the binary is stored via LFS.
from material-components-web-react.
@schliflo I think we can actually make the images publicly available for download. Then you and others will be able to download the images and run tests against them. You just wouldn't be able to upload images. But we could do that when/if there are changes that require that step.
Also we noticed that some of the verbiage in the https://github.com/material-components/material-components-web-react/tree/master/test/screenshot/README.md is not accurate. We will update!
from material-components-web-react.
Related Issues (20)
- Outlined Text Field variation does not respect `noLabel` prop.
- Compared with material ui HOT 2
- When using <List> with single selection, can't deselect.
- [Drawer] Switching between open "normal" drawer and closed modal drawer creates odd effect
- [Layout Grid] Breakpoint for extra large screens
- Abandonware? HOT 8
- Please add Bottom Navigation
- ListItemGraphic, ListItemText, ListItemMeta have tabIndex -1 by default
- [@material/react-switch] tabIndex prop is not propagated to inner <input>
- Feature Request: Support MDC data-table HOT 1
- Full-screen dialog
- Mark this repo as `Archived` HOT 5
- @material/react-material-icon | How to use outlined/sharp versions of icons? HOT 1
- Cannot build with "@material/textfield/icon/mdc-text-field-icon"
- Expand peerDependencies to include React version 17 HOT 1
- Select does't change value on option tag click (Firefox)
- Forwarding refs?
- React version conflict
- Is the project dead?
- Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. in MapViewDirections
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-components-web-react.