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

Renaming snapshots without or with visual changes (target snapshot name) #1347

Open
user4i opened this issue Aug 20, 2023 · 0 comments
Open
Labels
✨ enhancement New feature or request

Comments

@user4i
Copy link

user4i commented Aug 20, 2023

General info

It would be great to be able to rename snapshots. And keep visual comparing at same build.

If no such option, we would be thankful if you can add it.

Possible solution

Special option target-name to Per-snapshot configuration could be added. So Percy will compare snapshot like it name was not changed with snapshot from baseline named target-name , but new name will be name.

percySnapshot('New name', {
    'target-name': 'Previous snapshot name', // Name in baseline
    ...otherOPTIONS
})

Reasons

Sometimes we would like to change global approach of snapshots renaming. Renaming one or group of e.g. 100 snapshots together. But be sure in same time, that not visual changes in renamed future baseline.

E.g.:

  • Previous snapshot name Main page - nav bar,
  • We would add height suffix, so new name would be Main page - Nav bar - h1024
  • Or we would like to group all Site snapshots, for good logical separation from snapshots for Admin part, so new name will be Site - Main page - Nav bar - h1024
  • Such renaming can be global, as general approach to naming big group of files. E.g. 100 snapshots.
  • But if no visual changes during such renaming, so we miss and break approved baseline in history because of renaming. And missing of baseline could be for a big group of snapshots.
  • Or even some visual changes could be for some screenshots. But Percy can show changes by comparation with baseline (by previous name).

This would be reasonable addition for flexible handling of technical changes together with next environment variables:

  • PERCY_BRANCH
  • PERCY_TARGET_BRANCH
  • PERCY_COMMIT
  • PERCY_TARGET_COMMIT
@user4i user4i changed the title Renaming snapshots without visual changes (target snapshot name) Renaming snapshots without or with visual changes (target snapshot name) Aug 20, 2023
@itsjwala itsjwala added the ✨ enhancement New feature or request label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants