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

fix(BaseMenuItem): truncate text without spaces and add htmlTitle #2299

Merged
merged 7 commits into from
Jul 11, 2024

Conversation

saurabhdaware
Copy link
Member

@saurabhdaware saurabhdaware commented Jul 10, 2024

Description

Fixes #2275

Preview: https://61c19ee8d3d282003ac1d81c-hzfyfxtdyq.chromatic.com/?path=/story/components-dropdown-actionlist-stories--action-list-with-custom-items

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 Jul 10, 2024

🦋 Changeset detected

Latest commit: df35413

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
Contributor

github-actions bot commented Jul 10, 2024

✅ PR title follows Conventional Commits specification.

Copy link

codesandbox-ci bot commented Jul 10, 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 df35413:

Sandbox Source
razorpay/blade: basic Configuration

@rzpcibot
Copy link
Collaborator

rzpcibot commented Jul 10, 2024

Bundle Size Report

Updated Components
Status Component Base Size (kb) Current Size (kb) Diff
Accordion, AccordionItemHeader, AccordionItemBody, AccordionItem 7.456 7.464 +0.008 KB
ActionList, ActionListItem, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection 12.953 13.125 +0.172 KB
Alert 11.324 11.340 +0.016 KB
Amount 1.097 1.125 +0.028 KB
Avatar, AvatarGroup 3.707 3.713 +0.006 KB
Badge 0.783 0.790 +0.007 KB
useBaseMenuItem -0.050 -0.044 +0.006 KB
BladeProvider 1.695 1.709 +0.014 KB
BottomSheet 9.396 9.411 +0.015 KB
Box 0.767 0.775 +0.008 KB
Breadcrumb, BreadcrumbItem 2.503 2.498 -0.005 KB
ButtonGroup 1.107 1.114 +0.007 KB
Card, CardBody, CardHeader, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderTrailing, CardFooter, CardFooterLeading, CardFooterTrailing 9.233 9.244 +0.011 KB
Carousel, CarouselItem 6.812 6.817 +0.005 KB
Checkbox 5.932 5.950 +0.018 KB
Chip, ChipGroup 7.580 7.591 +0.011 KB
Collapsible, CollapsibleLink, CollapsibleButton, CollapsibleBody 9.680 9.689 +0.009 KB
Counter 0.753 0.755 +0.002 KB
DatePicker 84.978 85.102 +0.124 KB
Divider 0.515 0.523 +0.008 KB
Drawer, DrawerBody, DrawerHeader, drawerPadding 16.735 16.736 +0.001 KB
Dropdown, DropdownOverlay, DropdownButton, DropdownLink, DropdownFooter, DropdownHeader 27.993 28.004 +0.011 KB
FileUpload 17.043 17.053 +0.010 KB
Indicator 1.023 1.029 +0.006 KB
List, ListItem, ListItemLink, ListItemCode, ListItemText 5.102 5.098 -0.004 KB
Menu, MenuItem, MenuOverlay, MenuDivider, MenuFooter, MenuHeader 28.675 28.814 +0.139 KB
Modal 13.110 13.111 +0.001 KB
Popover, PopoverInteractiveWrapper 20.831 20.849 +0.018 KB
ProgressBar 3.094 3.113 +0.019 KB
Radio 4.727 4.731 +0.004 KB
SideNav, SideNavLink, SideNavLevel, SideNavSection, SideNavItem, SideNavFooter, SideNavBody, SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL 32.300 32.311 +0.011 KB
Skeleton 0.736 0.748 +0.012 KB
SpotlightPopoverTour, SpotlightPopoverTourFooter, SpotlightPopoverTourStep 29.351 29.359 +0.008 KB
StepGroup, StepItem, StepItemIcon, StepItemIndicator 6.706 6.718 +0.012 KB
Table, TableHeader, TableHeaderCell, TableHeaderRow, TableBody, TableCell, TableEditableCell, TableRow, TableFooter, TableFooterCell, TableFooterRow, TablePagination, TableToolbar, TableToolbarActions 64.127 64.236 +0.109 KB
Tabs, TabItem, TabList, TabPanel 6.983 7.004 +0.021 KB
Tag 3.430 3.448 +0.018 KB
ToastContainer, useToast 12.538 12.549 +0.011 KB
Tooltip, TooltipInteractiveWrapper 15.776 15.777 +0.001 KB
TopNav, TopNavActions, TopNavBrand, TopNavContent 4.080 4.092 +0.012 KB
Button 6.010 6.030 +0.020 KB
IconButton 0.779 0.775 -0.004 KB
CheckboxGroup 4.102 4.124 +0.022 KB
SelectInput, AutoComplete 34.880 34.897 +0.017 KB
OTPInput 29.767 29.788 +0.021 KB
PasswordInput 31.298 31.306 +0.008 KB
PhoneNumberInput 59.276 59.396 +0.120 KB
SearchInput 33.980 33.995 +0.015 KB
TextArea 31.650 31.674 +0.024 KB
TextInput 33.273 33.270 -0.003 KB
Link 2.120 2.116 -0.004 KB
RadioGroup 4.066 4.082 +0.016 KB
Spinner 1.796 1.812 +0.016 KB
TabNav, TabNavItem 9.153 9.167 +0.014 KB
Code 0.588 0.592 +0.004 KB
Display 0.479 0.488 +0.009 KB
Heading, getHeadingProps 0.421 0.432 +0.011 KB
Text -0.012 0.004 +0.016 KB

Generated by 🚫 dangerJS against df35413

@saurabhdaware saurabhdaware added the P0 Critical label Jul 10, 2024
@saurabhdaware saurabhdaware added the Review - L1 First level of review label Jul 10, 2024
const containerRef = React.useRef<HTMLDivElement>(null);
const textRef = React.useRef<HTMLParagraphElement>(null);

React.useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Should we use layoutEffect?

Copy link
Member Author

Choose a reason for hiding this comment

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

doesn't have to be render-blocking so should be fine for now. Can change this if its causing bugs

anuraghazra
anuraghazra previously approved these changes Jul 11, 2024
@saurabhdaware saurabhdaware merged commit 343d494 into master Jul 11, 2024
15 checks passed
@saurabhdaware saurabhdaware deleted the fix/menu-truncation branch July 11, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 Critical Review - L1 First level of review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dropdown values are not truncated
3 participants