Skip to content

Improve handling of package.json and other hidden files in Playground #461

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

Merged
merged 2 commits into from
Aug 26, 2021

Conversation

aomarks
Copy link
Member

@aomarks aomarks commented Aug 26, 2021

  • Bumps Playground to bring in Creating a file that exists but is hidden now reveals the file google/playground-elements#197. This allows users to create a package.json even though by default we include a hidden one. Previously it was not possible to modify the package.json (except by exploiting the next bug, which is now fixed).

  • Fix bug where we ignored the hidden flag when serializing project state to the URL.

  • Add indentation to our default package.json so that it's easier to read and modify when revealed.

  • (Unrelated, I guess just result of regenerating package locks) Fix a typing error relating to CSSResultGroup in one of the samples.

@github-actions
Copy link

github-actions bot commented Aug 26, 2021

A live preview of this PR will be available at the URL(s) below.
The latest URL will be appended to this comment on each push.
Each build takes ~5-10 minutes, and will 404 until finished.

https://pr461-34de3dd---lit-dev-5ftespv5na-uc.a.run.app/
https://pr461-27cd91a---lit-dev-5ftespv5na-uc.a.run.app/

Copy link
Contributor

@AndrewJakubowicz AndrewJakubowicz left a comment

Choose a reason for hiding this comment

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

Looks good! Asked a non blocking question.

I also used the link to manually test:

  • sharing a project (no package.json appeared).
  • Creating a package json and modifying it. Then sharing that. (It all works)

This is awesome!

content: content ?? '',
};
if (hidden) {
compactFile.hidden = true;
Copy link
Contributor

@AndrewJakubowicz AndrewJakubowicz Aug 26, 2021

Choose a reason for hiding this comment

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

Not actionable. I know that previously sharing would make the non visible package.json appear in the shared url. From manual testing I can see this no longer happens. Is that due to this assignment?

Also from manual testing this works great!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep. Previously we never included hidden flags in the URL, whereas now we preserve them.

@aomarks aomarks merged commit 175a19a into main Aug 26, 2021
@aomarks aomarks deleted the packagejson branch August 26, 2021 23:03
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.

2 participants