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

Updated storybook, split main component into more meaningful components #9

Merged
merged 20 commits into from
Nov 20, 2023

Conversation

manacy-keyvalue
Copy link
Collaborator

No description provided.

const RatingAverage: FC<IRatingAverageProp> = (props) => {
const {
ratings,
customAverageFn,

Choose a reason for hiding this comment

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

can't we have customAverageFn = getWeightedAverage and remove computeAverage?

README.md Outdated
averageRatingPrecision={2}
ratingAverageIconProps={{
fillColor: 'green',
bgColor: 'red'

Choose a reason for hiding this comment

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

Is the code part correctly formatted?

if (getElementStyle) return getElementStyle(ratingId);
return {};
const getRatingRanks = (): RatingRanks => {
if (Object.keys(ratingRanks).length) return { ...ratingRanks };

Choose a reason for hiding this comment

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

this spread has no here since this is used as prop

)}
<div
className={classes.ratingsWrapper}
style={{ ...styles[GenericElements.SummaryContainer] }}

Choose a reason for hiding this comment

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

this spread can be avoided

className={classes.starImage}
style={{ ...styles[GenericElements.AverageStarIcon] }}
>
<PartiallyFilledStar

Choose a reason for hiding this comment

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

Rename the component to match with the functionality

@bilta-keyvalue bilta-keyvalue merged commit 7245f90 into dev Nov 20, 2023
bilta-keyvalue pushed a commit that referenced this pull request Nov 23, 2023
* added search keyvwords for npm

* Updated storybook, split main component into more meaningful components (#9)

* Updated storybook, split main jsx into more meaningful components

* Added average rating section

* Added more style customisation options

* style corrections and more style customisation options added

* Added support for string rating-ids, refactored code

* updated testcases

* Updated readMe and storybook

* Rating rank logic adjusted

* updated storybook

* Added support to customize un-filled bar in the summary chart section

* made summary labels take width of longest item, making it into table style

* updated readMe and corrected indentation.

* updating storybook template

* update .gitignore

* PR comment fixes - Optimize code by removing unnecessary object spread operator, updated storybook, renamed a component

* PR comment fixes - renamed some props, updated readMe with more detailed information

* updated code-sandbox link with the one created in keyvalue workspace

* fixed issue: inner progress bar overflowing the outer container

* updated email in code_of_conduct.md file

* Added pull-request and style templates to the repo

* update release version in package.json

* fix:make description of prop ratingRanks simpler

* revert version bump

---------

Co-authored-by: GokulSNath <[email protected]>
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.

4 participants