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: add Arial as fallback for fonts #2048

Merged
merged 12 commits into from
Mar 1, 2024
Merged

feat: add Arial as fallback for fonts #2048

merged 12 commits into from
Mar 1, 2024

Conversation

saurabhdaware
Copy link
Member

@saurabhdaware saurabhdaware commented Feb 28, 2024

Description

Adds adjusted Arial as fallback for TASA and Inter

Resolves #1972

Changes

Additional Information

Component Checklist

  • Update Component Status Page
  • Perform Manual Testing in Other Browsers
  • Add KitchenSink Story
  • Add Interaction Tests (if applicable)
  • Add changeset

Copy link

changeset-bot bot commented Feb 28, 2024

🦋 Changeset detected

Latest commit: d191627

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@razorpay/blade Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codesandbox-ci bot commented Feb 28, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d191627:

Sandbox Source
razorpay/blade: basic Configuration

Copy link
Member

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

Are we planning to release fallback fonts for v10 too?

Copy link
Contributor

github-actions bot commented Feb 28, 2024

✅ PR title follows Conventional Commits specification.

@saurabhdaware
Copy link
Member Author

Are we planning to release fallback fonts for v10 too?

nope

@rzpcibot
Copy link
Collaborator

rzpcibot commented Feb 29, 2024

Bundle Size Report

Updated Components
Status Component Base Size (kb) Current Size (kb) Diff
Accordion, AccordionItem 4.753 4.719 -0.034 KB
ActionList, ActionListItem, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection 12.524 12.486 -0.038 KB
Alert 11.192 11.153 -0.039 KB
Amount 1.162 1.123 -0.039 KB
Badge 0.892 0.853 -0.039 KB
BladeProvider 1.727 1.687 -0.040 KB
BottomSheet 9.575 9.538 -0.037 KB
Box 0.814 0.774 -0.040 KB
Breadcrumb, BreadcrumbItem 2.606 2.567 -0.039 KB
Card, CardBody, CardHeader, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderTrailing, CardFooter, CardFooterLeading, CardFooterTrailing 8.891 8.849 -0.042 KB
Carousel, CarouselItem 6.915 6.876 -0.039 KB
Checkbox 5.951 5.914 -0.037 KB
Chip, ChipGroup 5.443 5.400 -0.043 KB
Collapsible, CollapsibleLink, CollapsibleButton, CollapsibleBody 9.340 9.299 -0.041 KB
Counter 0.856 0.816 -0.040 KB
Divider 0.607 0.569 -0.038 KB
Drawer, DrawerBody, DrawerHeader 15.797 15.757 -0.040 KB
Dropdown, DropdownOverlay, DropdownButton, DropdownLink, DropdownFooter, DropdownHeader 22.539 22.505 -0.034 KB
Indicator 0.996 0.958 -0.038 KB
List, ListItem, ListItemLink, ListItemCode, ListItemText 5.141 5.104 -0.037 KB
Modal 12.641 12.595 -0.046 KB
Popover, PopoverInteractiveWrapper 20.394 20.354 -0.040 KB
ProgressBar 1.760 1.722 -0.038 KB
Radio 4.767 4.728 -0.039 KB
Skeleton 0.827 0.787 -0.040 KB
SpotlightPopoverTour, SpotlightPopoverTourFooter, SpotlightPopoverTourStep 28.157 28.115 -0.042 KB
Switch 4.645 4.609 -0.036 KB
Table, TableHeader, TableHeaderCell, TableHeaderRow, TableBody, TableCell, TableRow, TableFooter, TableFooterCell, TableFooterRow, TablePagination, TableToolbar, TableToolbarActions 50.314 50.272 -0.042 KB
Tabs, TabItem, TabList, TabPanel 6.644 6.606 -0.038 KB
Tag 3.491 3.448 -0.043 KB
ToastContainer, useToast 12.528 12.487 -0.041 KB
Tooltip, TooltipInteractiveWrapper 15.264 15.225 -0.039 KB
Button 5.679 5.641 -0.038 KB
IconButton 0.870 0.834 -0.036 KB
CheckboxGroup 4.057 4.016 -0.041 KB
SelectInput, AutoComplete 17.306 17.264 -0.042 KB
OTPInput 11.498 11.455 -0.043 KB
PasswordInput 13.499 13.457 -0.042 KB
TextArea 11.887 11.847 -0.040 KB
TextInput 13.445 13.404 -0.041 KB
Link 2.165 2.126 -0.039 KB
RadioGroup 4.015 3.974 -0.041 KB
Spinner 1.980 1.933 -0.047 KB
Code 0.675 0.638 -0.037 KB
Display 0.577 0.535 -0.042 KB
Heading 0.542 0.500 -0.042 KB
Text 0.041 0.002 -0.039 KB

Generated by 🚫 dangerJS against d191627

anuraghazra
anuraghazra previously approved these changes Feb 29, 2024
snitin315
snitin315 previously approved these changes Feb 29, 2024
Copy link
Member

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

update snapshots.

@saurabhdaware
Copy link
Member Author

@anuraghazra @snitin315 I removed the CSS variables implementation. I thought when CSS variables are not available, it would just fallback to next available font which was Arial but instead when CSS variables were not available, it was invalidating that font-family definition itself which is why chromatic snapshots were showing that many changes. It was falling back to next font-family definition.

Now I directly refer to the font-face name in code

@saurabhdaware saurabhdaware removed the Review - L1 First level of review label Mar 1, 2024
@saurabhdaware saurabhdaware merged commit 26317e0 into master Mar 1, 2024
18 checks passed
@saurabhdaware saurabhdaware deleted the font-fallback branch March 1, 2024 07:35
anuraghazra pushed a commit that referenced this pull request Apr 9, 2024
* feat: add Arial as fallback for fonts

* feat: add more accurate overrides

* fix: basic example dependencies

* feat: update snapshots

* Create mighty-kangaroos-destroy.md

* fix: add blade prefix, update fonts.css url

* fix: snapshots

* feat: update snapshots again

* feat: remove font css variable

* fix: snapshots again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLS due to fallback font
4 participants