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

Prince/update webpack config to load css from quill library #657

Closed

Conversation

prince-deriv
Copy link
Contributor

@prince-deriv prince-deriv commented Jun 4, 2024

This pull request focuses on integrating the Quill UI library seamlessly into Smarttrader, optimizing its performance and compatibility. Here's a summary of the key modifications:

Transpilation Refinement: Enhanced the transpilation process of the Quill UI library to ensure smooth integration within Smarttrader. This involved adjusting configurations to align with Smarttrader's requirements and improve overall compatibility.

Package.json Update: Updated the Quill UI package.json to conform to Smarttrader's specifications. This included setting the correct module type and defining the main entry point for better integration.

CSS Consolidation: Consolidated all CSS files from the Quill UI library into a single file during transpilation. This streamlines the CSS import process and resolves any issues associated with importing CSS files within the Quill UI package.

Bundle Size Impact: With these optimizations, there's a 10% increase in Smarttrader's bundle size, from 26.6 MB to 29.4 MB. Despite the increase, the benefits of improved integration and performance justify the adjustment.

Dependency Management: Added necessary dependencies such as css-loader and style-loader to parse and resolve CSS imports within the library. This ensures smoother handling of CSS content during integration.

Theme Setup: Set up the default Quill UI theme to light, enhancing the overall visual consistency and user experience within Smarttrader.

@prince-deriv prince-deriv requested a review from a team as a code owner June 4, 2024 12:10
@@ -62,7 +62,7 @@ const Layout = () => {
}

return (
<html>
<html className='light'>
Copy link
Contributor

Choose a reason for hiding this comment

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

@prince-deriv i know there is no dark theme for SmartTrader at the moment. But it doesn't feel right to hard-code 'light' right here. Can we please make it dynamic, or use some config for controlling whether it's light or dark?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure @maryia-deriv I will check a way to store it somewhere

Copy link

Preview Link: https://pr-657.smarttrader-preview.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

Comment on lines +11 to +13
- name: Install dependencies
run: npm install
shell: bash
Copy link
Contributor

Choose a reason for hiding this comment

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

there is a separate action for npm install here -.github/actions/npm_install/action.yml. Can you make the changes in that file if needed?

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.

3 participants