-
Notifications
You must be signed in to change notification settings - Fork 151
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: add error message when project not aligned to spaceId #7587
feat: add error message when project not aligned to spaceId #7587
Conversation
334ac4a
to
555a24d
Compare
✅ Deploy Preview for ecommerce-app-base-components canceled.
|
✅ Deploy Preview for ecommerce-app-base-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
1181671
to
eb0dd3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, just one or two small suggestions.
A few questions about the error message:
- Should this be a warning? I feel like we don't have enough confidence that it's wrong to show a true error.
- Probably would be nice to show the value of that env var in the message? I guess it might help allay confusion.
Yeah good questions!
|
54f9824
to
45f72c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and makes sense to me 🤌 ✨
Purpose
The purpose of this PR is to add an error message when the user selects a project that is not configured to be in the space where the current app is installed/being installed.
Approach
I added the below error message on render of the page AND when the user changes project, and the selected project contains an incompatible
CONTENTFUL_SPACE_ID
variable. The error lingers until the user changes to a valid project, but they are still able to install and save changes.Testing steps
Within this space, I have created one Vercel project that is compatible with the space:
nextjs-lb-4
. The rest of the projects are not compatible, so you should see warnings for all other project selections.