-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Automatically mount storefront where Solidus is mounted #359
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kennyadsl
added a commit
to nebulab/solidus
that referenced
this pull request
Dec 1, 2023
Since we moved the frontend as an injectable templating system, there are some manual steps to do to make the application work when a user wants to change the mount point of where Solidus is installed. With this change, along with solidusio/solidus_starter_frontend#359, we allow the user to select the mount point during the install, and all the changes required are handled by the install script.
kennyadsl
added a commit
to nebulab/solidus
that referenced
this pull request
Dec 1, 2023
Since we moved the frontend as an injectable templating system, there are some manual steps to do to make the application work when a user wants to change the mount point of where Solidus is installed. With this change, along with solidusio/solidus_starter_frontend#359, we allow the user to select the mount point during the install, and all the changes required are handled by the install script.
3 tasks
elia
approved these changes
Dec 1, 2023
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 great! Left a proposal for cleaning up the routes for your consideration, but I'm happy to merge as is 🙌
kennyadsl
added a commit
to nebulab/solidus
that referenced
this pull request
Dec 1, 2023
Since we moved the frontend as an injectable templating system, there are some manual steps to do to make the application work when a user wants to change the mount point of where Solidus is installed. With this change, along with solidusio/solidus_starter_frontend#359, we allow the user to select the mount point during the install, and all the changes required are handled by the install script.
Right now, no matter where Solidus is mounted, the storefront will live at the root of the application. Most of the times, this is not the expected behavior because if Solidus lives at /store for example, the user probably also wants the storefront to live at that path. This change will change the install template to detect where Solidus has been mounted and use that path as the scope of the routes. Grouping the routes in a scope and in a separate file has the advantage to have all the injected routes isolated, which might help with having a clearer routes file in the application. On the other hand, when Solidus is mounted at /, the scope is useless and might be avoided, but I think we can live with that.
kennyadsl
force-pushed
the
kennyadsl/mountpoint-storefront
branch
from
December 1, 2023 17:45
fdcb0b2
to
ce450b7
Compare
elia
approved these changes
Dec 4, 2023
elia
pushed a commit
to nebulab/solidus
that referenced
this pull request
Dec 4, 2023
Since we moved the frontend as an injectable templating system, there are some manual steps to do to make the application work when a user wants to change the mount point of where Solidus is installed. With this change, along with solidusio/solidus_starter_frontend#359, we allow the user to select the mount point during the install, and all the changes required are handled by the install script.
elia
pushed a commit
to nebulab/solidus
that referenced
this pull request
Dec 5, 2023
Since we moved the frontend as an injectable templating system, there are some manual steps to do to make the application work when a user wants to change the mount point of where Solidus is installed. With this change, along with solidusio/solidus_starter_frontend#359, we allow the user to select the mount point during the install, and all the changes required are handled by the install script.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Right now, no matter where Solidus is mounted, the storefront will live at the root of the application.
Most of the times, this is not the expected behavior because if Solidus lives at /store for example, the user probably also wants the storefront to live at that path.
This change will change the install template to detect where Solidus has been mounted and use that path as the scope of the routes.
Grouping the routes in a scope and in a separate file has the advantage to have all the injected routes isolated, which might help with having a clearer routes file in the application. On the other hand, when Solidus is mounted at /, the scope is useless and might be avoided, but I think we can live with that.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: