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

Ensure _client and _server Templates Don't Appear in Studio. #423

Merged
merged 6 commits into from
Oct 25, 2023

Conversation

tmeyer2115
Copy link
Contributor

@tmeyer2115 tmeyer2115 commented Oct 25, 2023

This PR ensures Studio will not display the _client.tsx or _server.tsx Templates. These Templates are reserved files in PagesJS. They don't actually correspond to a Page, but instead dictate how SSR works. In the future, we will be able to exclude these files by supporting Globs in the Studio Config's paths. For now, Product does not have the appetite for adding Globs.

We now prevent someone from adding a Page in Studio whose filename is _client or _server (assuming they're in PagesJS mode).

J=SLAP-2960
TEST=auto, manual

@tmeyer2115 tmeyer2115 changed the title Draft. Ensure _client and _server Templates Don't Appear in Studio. Oct 25, 2023
@tmeyer2115 tmeyer2115 marked this pull request as ready for review October 25, 2023 14:38
@tmeyer2115 tmeyer2115 requested a review from a team October 25, 2023 14:59
@tmeyer2115
Copy link
Contributor Author

Screenshot 2023-10-25 at 12 00 42 PM
Screenshot 2023-10-25 at 12 00 52 PM

@tmeyer2115 tmeyer2115 merged commit 152266f into main Oct 25, 2023
15 checks passed
@tmeyer2115 tmeyer2115 deleted the dev/ignore-reserved-templates branch October 25, 2023 17:35
@alextaing alextaing mentioned this pull request Oct 30, 2023
alextaing added a commit that referenced this pull request Oct 30, 2023
## Features
- We have introduced Collapsible Sidebars (#408).
- We now support aliased type imports (#411).
- The TypeScript utility types Omit, Pick, and Required are now
supported for props in a component's prop interface (#413, #414, #415).
- The Studio Preview can now display CSS and SCSS styling (#418).
- Undo keyboard shortcuts (`cmd+z` for OS X, and `ctrl+z` for other
OSes) are now supported in Studio (#417).

## Changes
- `_server.tsx` and `_client.tsx` are now reserved template names for
PagesJS Repos (#423).

## Fixes
- Miscellaneous viewport bugs have been fixed (#424).
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