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

added sharp styles #49

Merged
merged 9 commits into from
Mar 31, 2023
Merged

added sharp styles #49

merged 9 commits into from
Mar 31, 2023

Conversation

kelseythejackson
Copy link
Member

Description

This adds the Regular & Light styles for the Sharp family, as well as enables the Sharp Solid style. Two "bugs" are addressed in this PR:

Sharp Solid availability bug#47
Add Sharp Regular#48

Review

@mlwilkerson Could you take a look to make sure all spots that needed to be updated were hit?
@frrrances You were the designer on this, so I could use your eyes if anything was missed

Comment on lines 491 to 498
render() {
const falDisabled = !this.pro();
const faslDisabled = !this.isSharpLightAvailable();
const fassDisabled = !this.isSharpSolidAvailable();
const fasrDisabled = !this.isSharpRegularAvailable();
const fatDisabled = !(this.isV6() && this.pro());
const fadDisabled = !this.isDuotoneAvailable();
const fakDisabled = !this.mayHaveIconUploads();
Copy link
Member Author

Choose a reason for hiding this comment

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

@mlwilkerson @frrrances Checked to make sure that the "pro" styles are disabled if no kit token is supplied

Screenshot 2023-03-29 at 12 48 54 PM

Screenshot 2023-03-29 at 12 50 07 PM

@kelseythejackson
Copy link
Member Author

Screen.Recording.2023-03-27.at.5.14.29.PM.mov

Copy link
Member

@mlwilkerson mlwilkerson left a comment

Choose a reason for hiding this comment

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

oh... it feels good to get this updated. nice.

Made some comments requesting changes to minimum version requirements and semver satisfaction.

I think it might be good to add tests asserting the values produced by those computed properties: isSharpSolidAvailable, isSharpRegularAvailable, and isSharpLightAvailable. Seems like these are all too easy to mistake, so test coverage seems useful here. Or if we do already have test coverage there, then test fixes to ensure that we don't regress the related min version requirement bugs again, once they're fixed here.

packages/fa-icon-chooser/src/utils/slots.tsx Outdated Show resolved Hide resolved
readme.md Outdated
@@ -26,7 +26,7 @@ When used with a kit, everything is available, according to that kit's configura
- Font Awesome Pro
- Font Awesome 6

Including the Sharp Solid style, when using a Pro kit with Font Awesome 6.2.0 or newer!
Including the Sharp Regular & Light styles, when using a Pro kit with Font Awesome 6.4.0 or newer!
Copy link
Member

Choose a reason for hiding this comment

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

again FA 6.3.0 is the min version for Sharp Regular, while 6.4.0 is the min version for Sharp Light. This sentence doesn't distinguish them, so it sounds like they both first became available in 6.4.0.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mlwilkerson would it make sense just to remove that sentence?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, yeah. Removing it, it's not necessary now

Copy link
Member

@frrrances frrrances left a comment

Choose a reason for hiding this comment

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

@kelseythejackson Nice work! This is super helpful. I marked one spot where there were console.log outputs to double-check but otherwise the code looks good.

But since these buttons add a lot more content width to the style select buttons area, we need to update the layout to manage them better. It looks like you have your browser full width, when this component usually renders at about the tablet width when in WordPress.

Do you want to take a pass as that work or would you like me to give you a mock to aim for?

@@ -449,7 +456,18 @@ export class FaIconChooser {
}

isSharpSolidAvailable() {
return this.pro() && !!this.resolvedVersion().match('(6.2[0-9]*.)');
console.log(semver.satisfies(this.resolvedVersion(), '>=6.2.0'));
Copy link
Member

Choose a reason for hiding this comment

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

Should these console.log lines (here and below) stay in the finished code?

@@ -26,7 +26,6 @@ When used with a kit, everything is available, according to that kit's configura
- Font Awesome Pro
- Font Awesome 6

Copy link
Member

Choose a reason for hiding this comment

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

Looks like there are a couple of extra returns in here (not from you). Mind cleaning those up while you're in here?

Copy link
Member

@mlwilkerson mlwilkerson left a comment

Choose a reason for hiding this comment

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

awesome

Copy link
Member

@frrrances frrrances left a comment

Choose a reason for hiding this comment

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

Looks great, @kelseythejackson! 🚀

@kelseythejackson kelseythejackson merged commit 0b573ef into main Mar 31, 2023
@kelseythejackson kelseythejackson deleted the add-sharp-regular branch March 31, 2023 15:30
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