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

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

Closed
gr2m opened this issue Jun 1, 2023 · 4 comments · Fixed by #4
Closed

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

gr2m opened this issue Jun 1, 2023 · 4 comments · Fixed by #4
Assignees
Labels

Comments

@gr2m
Copy link
Owner

gr2m commented Jun 1, 2023

follow up to primer/view_components#2038 (comment)

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
Copy link

@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
Copy link
Owner Author

gr2m commented Jun 1, 2023

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
Copy link

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

👍

Should we use the fully qualified names instead?

Yes please

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

🎉 This issue has been resolved in version 2.0.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants