Skip to content
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: Support static snapshots in .percy.yml configuration file #159

Merged
merged 11 commits into from
Jun 6, 2019

Conversation

maprules1000
Copy link
Contributor

Description

This PR adds the static snapshot flags to the percy.yml file.

Since each flag has a default, the preference is to look for the yml file setting, and fall back to the flags passed in through the command line. Otherwise the defaults will always be used and the percy.yml settings will never be picked up.

@maprules1000 maprules1000 changed the title Add Static Snapshot Options to percy.yml file feat: add static snapshot options to percy.yml file Apr 17, 2019
@@ -22,7 +29,9 @@ const configuration = (relativePath = '.percy.yml'): Configuration => {
// in a chain. snapshot specific options -> agent configuration -> default values

const defaultConfiguration: Configuration = {
version: 1.0, snapshot: {},
version: 1.0,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this version be updated since it introduces static_site? It is still 100% compatible with the existing format

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, 1.1?

@maprules1000 maprules1000 changed the title feat: add static snapshot options to percy.yml file chore: add static snapshot options to percy.yml file Apr 18, 2019
@maprules1000 maprules1000 force-pushed the map/static-snapshop-options-yml-file branch from ca7fc2b to 7a07c6d Compare May 2, 2019 16:53
@djones djones changed the title chore: add static snapshot options to percy.yml file feat: support static snapshot configuration in .percy.yml May 14, 2019
@djones djones changed the title feat: support static snapshot configuration in .percy.yml feat: Support static snapshot configuration in .percy.yml May 14, 2019
@Robdel12 Robdel12 force-pushed the map/static-snapshop-options-yml-file branch from 5019d9c to 1faf252 Compare May 14, 2019 02:01
Copy link
Contributor

@Robdel12 Robdel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking nice. Rebased to fix the test issues we were seeing from #187

cc: @djones

Edit: I plan on pushing this over the finish line 😃

@@ -2,3 +2,7 @@ version: 1
snapshot:
widths: [375, 1280]
min-height: 1024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-existing, but interesting this is not camel cased.

test/support/.percy.yml Outdated Show resolved Hide resolved
@@ -22,7 +29,9 @@ const configuration = (relativePath = '.percy.yml'): Configuration => {
// in a chain. snapshot specific options -> agent configuration -> default values

const defaultConfiguration: Configuration = {
version: 1.0, snapshot: {},
version: 1.0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, 1.1?

src/utils/configuration.ts Outdated Show resolved Hide resolved
@@ -22,11 +29,12 @@ const configuration = (relativePath = '.percy.yml'): Configuration => {
// in a chain. snapshot specific options -> agent configuration -> default values

const defaultConfiguration: Configuration = {
version: 1.0, snapshot: {},
'version': 1.0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should stay as 1.0. These new options are completely compatible with the current configuration. We don't actually have any configuration version handling in place, this was just added for future proofing if we do find ourselves with breaking changes.

@djones djones changed the title feat: Support static snapshot configuration in .percy.yml feat: Support static snapshots in .percy.yml configuration file Jun 5, 2019
Copy link
Contributor

@Robdel12 Robdel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏁 LGTM 😃

@djones djones merged commit d9e5efe into master Jun 6, 2019
@delete-merged-branch delete-merged-branch bot deleted the map/static-snapshop-options-yml-file branch June 6, 2019 22:25
djones pushed a commit that referenced this pull request Jun 6, 2019
# [0.6.0](v0.5.3...v0.6.0) (2019-06-06)

### Features

* Support static snapshots in `.percy.yml` configuration file ([#159](#159)) ([d9e5efe](d9e5efe))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants