- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.3k
 
Chromatic adding some Arabic, Chinese, and Japanese string to test fonts #2155
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
Conversation
| 
           Build successful! 🎉  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just minor comments on translation.
        
          
                packages/@react-spectrum/menu/chromatic/MenuTrigger.chromatic.tsx
              
                Outdated
          
            Show resolved
            Hide resolved
        
      Co-authored-by: solimant <solimant@users.noreply.github.com>
Co-authored-by: solimant <solimant@users.noreply.github.com>
| 
           Build successful! 🎉  | 
    
| 
           Build successful! 🎉  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one thing, but otherwise looks good
| export const TemplateArabicWithIcons = (): Story<SpectrumMenuTriggerProps> => (args) => ( | ||
| <MenuTrigger {...args} isOpen> | ||
| <ActionButton> | ||
| Menu Button | ||
| </ActionButton> | ||
| <Menu items={withArabic}> | ||
| {item => customMenuItem(item)} | ||
| </Menu> | ||
| </MenuTrigger> | ||
| ); | ||
| 
               | 
          
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one isn't rendering in the MenuTrigger chromatic story. Instead of exporting this and importing it in the RTL chromatic story you could do the following:
const TemplateArabicWithIcons = (): Story<SpectrumMenuTriggerProps> => (args) => (
  <MenuTrigger {...args} isOpen>
    <ActionButton>
      Menu Button
    </ActionButton>
    <Menu items={withArabic}>
      {item => customMenuItem(item)}
    </Menu>
  </MenuTrigger>
);
...
export const TemplateArabic = TemplateArabicWithIcons().bind({});
TemplateArabic.storyName = 'Arabic complex items';
and in MenuTriggerRTL file:
export {
  TemplateArabic,
  Default,
  WithSections,
  Complex,
  AlignEnd,
  DirectionTop,
  DirectionBottom,
  DirectionStart,
  DirectionStartEnd,
  DirectionEnd,
  DirectionLeft,
  DirectionLeftEnd,
  DirectionRight,
  DirectionRightEnd
} from './MenuTrigger.chromatic';
| 
           Build successful! 🎉  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| 
           Build successful! 🎉  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextArea:value: 測試, icon: Info, labelPosition: side, validationState: valid
doesn't quite fit
nor does
Textfield:value: 測試, icon: Info, labelPosition: side, validationState: valid
I know we have a few that don't fit already, but I want to try to not introduce new ones
The rest look fine
| 
           Build successful! 🎉  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the wrap looks good on the textarea/field chromatic stories
| 
           Build successful! 🎉  | 
    
no issue, but related to #1094 to making testing #2057 with chromatic better
adding Arabic, Chinese, and Japanese strings and locales to Chromatic tests to make sure everything with the improved font-family handling is better.
✅ Pull Request Checklist:
📝 Test Instructions:
added Chinese, Japanese, and Arabic strings to button, menu, and textfield stories within chromatic
🧢 Your Project:
RSP