gr2m / primer-changesets-cli

The Primer flavored changesets CLI
MIT License
2 stars 0 forks source link

Use `static/info_arch.json` as source for components for `primer/view_components` #3

Closed gr2m closed 1 year ago

gr2m commented 1 year ago

follow up to https://github.com/primer/view_components/pull/2038#issuecomment-1571328431

At first glance, static/info_arch.json return 76 components > ActionList, ActionMenu, AutoComplete, AutoComplete, Avatar, AvatarStack, Banner, BaseButton, BaseComponent, Blankslate, Blankslate, BorderBox, Box, Breadcrumbs, Button, Button, ButtonGroup, ButtonMarketing, CheckBox, CheckBoxGroup, ClipboardCopy, CloseButton, ConditionalWrapper, Content, Counter, Details, Dialog, Dropdown, Flash, FormButton, FormControl, Heading, HellipButton, HiddenTextExpander, IconButton, IconButton, Image, ImageCrop, Label, Layout, Layout, Link, Markdown, Menu, MultiInput, NavList, Navigation::Tab, Navigation::Tab, Octicon, OcticonSymbols, Overlay, Popover, ProgressBar, RadioButton, RadioButtonGroup, RelativeTime, SegmentedControl, Select, Spinner, State, Subhead, SubmitButton, TabContainer, TabNav, TabPanels, Text, TextArea, TextField, TimelineItem, ToggleSwitch, Tooltip, Tooltip, Truncate, Truncate, UnderlineNav, UnderlinePanels
While https://primer.github.io/view_components/components.json only returns 69 > action_list, action_list_divider, action_list_heading, action_list_item, action_menu, auto_complete, auto_complete_item, avatar, avatar_stack, banner, base_button, blankslate, blankslate, border_box, border_box_header, box, breadcrumbs, button, button, button_group, button_marketing, clipboard_copy, close_button, counter, details, dialog, dropdown, flash, heading, hellip_button, hidden_text_expander, icon_button, icon_button, image, image_crop, label, layout, layout, link, markdown, menu, nav_list, nav_list_group, nav_list_item, navigation_tab, navigation_tab, octicon, octicon_symbols, overlay, popover, progress_bar, relative_time, segmented_control, spinner, state, subhead, tab_container, tab_nav, tab_panels, text, text_field, timeline_item, toggle_switch, tooltip, tooltip, truncate, truncate, underline_nav, underline_panels

Also the capitalization is different

camertron commented 1 year ago

@gr2m it looks like at least one component is in there twice, probably because of the status namespacing, eg Alpha::Tooltip vs Beta::Tooltip. You can also probably exclude BaseComponent and ConditionalWrapper as they are only used internally.

gr2m commented 1 year ago

You can also probably exclude BaseComponent and ConditionalWrapper as they are only used internally.

Shouldn't hurt to keep them, consumers just wouldn't subscribe to them. I'd prefer not to add extra logic to the parsing.

it looks like at least one component is in there twice, probably because of the status namespacing, eg Alpha::Tooltip vs Beta::Tooltip

Should we use the fully qualified names instead? I assume the fully qualified name are also what is used in Ruby code when importing them? So e.g. Primer::Alpha::ActionList instead of just ActionList

camertron commented 1 year ago

I'd prefer not to add extra logic to the parsing.

👍

Should we use the fully qualified names instead?

Yes please

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 2.0.9 :tada:

The release is available on:

Your semantic-release bot :package::rocket: