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

PWA URL Rewriting #110

Merged
merged 9 commits into from
Mar 2, 2020
Merged

PWA URL Rewriting #110

merged 9 commits into from
Mar 2, 2020

Conversation

dhhyi
Copy link
Collaborator

@dhhyi dhhyi commented Feb 11, 2020

PR Type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

What Is the Current Behavior?

URLs in PWA shopping experience are fairly static and not easily customizable.

Issue Number:
Closes #33
Closes #11

What Is the New Behavior?

URL rewriting (Wiki)

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

@dhhyi dhhyi added the feature New feature or request label Feb 11, 2020
@dhhyi dhhyi self-assigned this Feb 11, 2020
@dhhyi dhhyi changed the title PWA URL rewriting PWA URL Rewriting Feb 11, 2020
dhhyi added a commit that referenced this pull request Feb 12, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe

BREAKING CHANGE: product URLs no longer match static pattern .*/product/<sku> but can instead be localized and customized for any pattern
dhhyi added a commit that referenced this pull request Feb 12, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe

BREAKING CHANGE: category URLs no longer match static pattern /category/<categoryUniqueId> but can instead be localized and customized for any pattern
dhhyi added a commit that referenced this pull request Feb 13, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
dhhyi added a commit that referenced this pull request Feb 13, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
dhhyi added a commit that referenced this pull request Feb 13, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
dhhyi added a commit that referenced this pull request Feb 13, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
dhhyi added a commit that referenced this pull request Feb 13, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
dhhyi added a commit that referenced this pull request Feb 13, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
dhhyi added a commit that referenced this pull request Feb 14, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
dhhyi added a commit that referenced this pull request Feb 14, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
@dhhyi dhhyi force-pushed the feature/pwa_url_rewriting branch 4 times, most recently from 8936f60 to 9398dd7 Compare February 15, 2020 10:08
dhhyi added a commit that referenced this pull request Feb 16, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
dhhyi added a commit that referenced this pull request Feb 16, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
dhhyi added a commit that referenced this pull request Feb 17, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
@dhhyi dhhyi marked this pull request as ready for review February 18, 2020 10:22
dhhyi added a commit that referenced this pull request Feb 19, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
dhhyi added a commit that referenced this pull request Feb 19, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
dhhyi added a commit that referenced this pull request Feb 24, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
dhhyi added a commit that referenced this pull request Feb 24, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
@shauke shauke added this to the 0.18 milestone Feb 26, 2020
@Sebastian-Haehnlein
Copy link
Contributor

LinkParser.parseLink() should modified
used in ServerHtmlDirective

- cleanup unused parameters of constructors in tests
- safety checks
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
@dhhyi
Copy link
Collaborator Author

dhhyi commented Feb 28, 2020

LinkParser.parseLink() should modified
used in ServerHtmlDirective

Done ✔️

Also changed the category slug to the deepest category only

@@ -19,7 +19,7 @@ import { ShellModule } from './shell/shell.module';
ShellModule,
AppRoutingModule,
QuotingRoutingModule,
AppNotFoundRoutingModule,
AppLastRoutingModule,
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason why its not in AppRoutingModule

Copy link
Collaborator Author

@dhhyi dhhyi Mar 2, 2020

Choose a reason for hiding this comment

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

In theory, the new category and product route definitions could also reside in the app-routing, but I figured, it's better to have them somewhere else close together, because the order of those dynamic routes is important.

Currently every product route (with -sku123-cat456) would also match the category route, so it must come before the category route.

One could also think of a route that matches nearly everything and if it resides in the app-routing, it will also capture all routes by pages added with schematics or extensions (as they are added at the bottom of those lists.)

@dhhyi dhhyi merged commit 6d34b1b into develop Mar 2, 2020
@dhhyi dhhyi deleted the feature/pwa_url_rewriting branch March 2, 2020 11:16
dhhyi added a commit that referenced this pull request Mar 2, 2020
- moved ProductRoutePipe to core/routing/product
- match incoming URLs for products with Angular UrlMatcher and RegExp pattern
- improved typing of ProductRoutePipe
dhhyi added a commit that referenced this pull request Mar 2, 2020
…#110)

- moved CategoryRoutePipe to core/routing/category
- match incoming URLs for categories with Angular UrlMatcher and RegExp pattern
- improved typing of CategoryRoutePipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] SEO-friendly URLs
3 participants