jss icon indicating copy to clipboard operation
jss copied to clipboard

[Angular] Allow for canactivate and resolvers

Open jlast opened this issue 4 years ago • 11 comments

With these changes you can add canactive and resolvers to your application, allowing for components to load their data before rendering.

Combine this with the sc-placeholder loaded event for optimal loading experience.

Description

With these changes you can add canactive and resolvers to your application, allowing for components to load their data before rendering.

Combine this with the sc-placeholder loaded event for optimal loading experience.

Motivation

We needed a better loading experience for customers. This change allowed us to add a pretty skeleton loading before the data was loaded.

How Has This Been Tested?

We included this change into the application.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [x] Documentation update (non-breaking change; modified files are limited to the /docs directory)

Checklist:

  • [x] I have read the Contributing guide.
  • [x] My code follows the code style of this project.
  • [x] My code/comments/docs fully adhere to the Code of Conduct.
  • [x] My change is a code change and it requires an update to the documentation.
  • [x] My change is a documentation change and it requires an update to the navigation.

jlast avatar May 19 '20 11:05 jlast

@jlast Can you remove changes related to code formatting? Seems that some formatter is installed in your workspace. It's hard to analyse your changes.

sc-illiakovalenko avatar Jul 02 '20 10:07 sc-illiakovalenko

@jlast Can you remove changes related to code formatting? Seems that some formatter is installed in your workspace. It's hard to analyse your changes.

Thanks for the reply, updated the pull request

jlast avatar Jul 08 '20 08:07 jlast

@jlast Please, check again, build is failed

sc-illiakovalenko avatar Jul 08 '20 11:07 sc-illiakovalenko

@sc-illiakovalenko Fixed an import, all checks have passed now.

jlast avatar Jul 08 '20 12:07 jlast

@jlast But you still have a lot of changes related to code formatting In the last commit you added it. Please, revert it - carefully

sc-illiakovalenko avatar Jul 10 '20 10:07 sc-illiakovalenko

@jlast But you still have a lot of changes related to code formatting In the last commit you added it. Please, revert it - carefully

@sc-illiakovalenko I should keep a dedicated no-format-on-save config for this project 😄 Thanks for your patience, pipelines are succeeding and reformatting is all undone.

jlast avatar Jul 10 '20 10:07 jlast

@jlast No problem 😄 Please, revert your formatting changes in, check it packages/sitecore-jss-angular/src/components/placeholder.component.ts packages/sitecore-jss-angular/src/components/render-component.component.ts packages/sitecore-jss-angular/src/jss-component-factory.service.ts

sc-illiakovalenko avatar Jul 10 '20 14:07 sc-illiakovalenko

@jlast For example

image

sc-illiakovalenko avatar Jul 10 '20 14:07 sc-illiakovalenko

@sc-illiakovalenko alright, updated it

jlast avatar Jul 10 '20 14:07 jlast

@jlast I want to ask you, switch target branch to: release/15.0.0. And pull it

sc-illiakovalenko avatar Jul 13 '20 12:07 sc-illiakovalenko

I'll update this merge request probably in 1-2 weeks, working on other priorities for our client at the moment.

jlast avatar Aug 13 '20 09:08 jlast

@jlast Thank you for contribution, I pulled your changes in #1246, added some extra stuff and merged

illiakovalenko avatar Nov 22 '22 14:11 illiakovalenko