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

Feat: cwm select input for font weight #1655

Open
wants to merge 1 commit into
base: cwm
Choose a base branch
from

Conversation

khalatevarun
Copy link
Contributor

@khalatevarun khalatevarun commented Jun 25, 2023

Description

Fixes #1636

  • Replace text input with select input
  • Removed unnecessary code from handleChange and loadWeight function after addition of select input

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Before After
image image

How Has This Been Tested?

  • Cypress integration
  • Cypress component tests
  • Jest unit tests

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@khalatevarun khalatevarun changed the base branch from main to cwm June 25, 2023 20:44
@khalatevarun
Copy link
Contributor Author

@RubenSmn i have a blocker here, i understood why we have loadWeight function but did not really understand how does it work, where do we show the loader component now after adding select menu?

Also, please review the code removed in handleChange and loadWeight functions since it seemed unnecessary after adding select input

Copy link
Member

@RubenSmn RubenSmn left a comment

Choose a reason for hiding this comment

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

The change logic looks good, maybe we can use the IconComponent prop on the Select component to change the icon to a loading spinner. This will give the user a indication that the new font are being loaded.

We could even manually control the open state of the select and only close the select dropdown when the font weight has successfully loaded.

@khalatevarun
Copy link
Contributor Author

When will the loading spinner appear is my question, not able to reproduce a scenario where I can test it

@khalatevarun
Copy link
Contributor Author

@dadiorchen can you please help here answering my doubt?

@RubenSmn
Copy link
Member

RubenSmn commented Jun 29, 2023

@khalatevarun we have a loading state for when we're loading the new font weights. If its true we can show to loader. Does this answer your question?

@RubenSmn
Copy link
Member

RubenSmn commented Aug 2, 2023

@khalatevarun are you facing any issues?

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.

None yet

2 participants