Skip to content

Conversation

platon-rov
Copy link
Contributor

@platon-rov platon-rov commented Jul 28, 2022

Related Issue(s)

Closes #8350
Closes #8457
Refers to #8258

Description

  • Library deps were made peerDeps to fix various issues with multiple deps instances.
  • Core schematics updated to setup Theming out of the box.
  • Core schematics styles and assets adding fixed to have all the files only on the library (our) side.
  • Migrations created to remove old styles and assets.

TDB, Not done

  • Removing the old deprecated Themes.

Please check whether the PR fulfills the following requirements

PR Quality

BREAKING CHANGES:
* previously created styles and assets are outdated now. use `ng update` to fix them automatically.
* after update run `ng add @fundamental-ngx/core` once again to automatically setup things in the new way.
@netlify
Copy link

netlify bot commented Jul 28, 2022

Deploy Preview for fundamental-ngx ready!

Name Link
🔨 Latest commit 72639f3
🔍 Latest deploy log https://app.netlify.com/sites/fundamental-ngx/deploys/62e28573df4ad3000872d830
😎 Deploy Preview https://deploy-preview-8465--fundamental-ngx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Jul 28, 2022

Visit the preview URL for this PR (updated for commit 72639f3):

https://fundamental-ngx-gh--pr8465-pr-fix-schematics-me-l3ntmedx.web.app

(expires Sun, 31 Jul 2022 12:56:22 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@platon-rov platon-rov force-pushed the pr/fix/schematics-mega-update branch from 37d69eb to 72639f3 Compare July 28, 2022 12:47
@droshev droshev added this to the Sprint 93 - Manila milestone Jul 28, 2022
@SAP SAP deleted a comment from netlify bot Jul 28, 2022
Copy link
Contributor

@N1XUS N1XUS left a comment

Choose a reason for hiding this comment

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

Awesome job!


function noticeAddSchematics(): Rule {
return (_: Tree, context: SchematicContext) => {
context.logger.info(`ℹ️ Now you have run ng-add schematics once again to setup things in the right way.`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just run another migration here which will do what's needed?

Copy link
Contributor Author

@platon-rov platon-rov Jul 29, 2022

Choose a reason for hiding this comment

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

As I mentioned in the comment in the code below we can but we cannot pass options there. All the prompts will be asked again but $defaults won't be resolved properly.

overwrite: true
});
}
if (
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just move it to fundamental-ngx dependencies tree so it would automatically install needed version even if user simply updates the version manually in package.json of his/hers project?

Copy link
Contributor Author

@platon-rov platon-rov Jul 29, 2022

Choose a reason for hiding this comment

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

If you mean make styles & base-theming deps of the ngx/core - no we can't.

In the code below we set some assets & styles using relative paths

./node_modules/@sap-theming/theming-base-content/content/Base/baseLib/

In case we will have them as deps they may be placed under the specified path or under the following path

./node_modules/@fundamental-ngx/core/node_modules/@sap-theming/theming-base-content/content/Base/baseLib/

and it may change in future, see more about it in ticket #8350

};
}
if (options.fonts) {
additionalStyles.push('./node_modules/@fundamental-ngx/core/assets/fundamental-ngx-core-fonts.scss');
Copy link
Contributor

Choose a reason for hiding this comment

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

If user's project uses less/css instead of scss? Maybe provide a simple css file which would 100% work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,6 @@
@font-face {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think more correct way would be to move all css-related code to fundamental-styles theming. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you mean fonts - agree, we could do this.

But common css libs/core/src/lib/assets/fundamental-ngx-core.scss probably should be kept in ngx to have ability to add any code that might be not present in styles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@droshev droshev merged commit 1dc00d1 into main Jul 29, 2022
@droshev droshev deleted the pr/fix/schematics-mega-update branch July 29, 2022 09:45
platon-rov added a commit that referenced this pull request Jul 29, 2022
platon-rov added a commit that referenced this pull request Jul 29, 2022
droshev pushed a commit that referenced this pull request Jul 29, 2022
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.

Theming Bug bug(core, platform): lib's dependencies & theming service issues
3 participants