woylie

woylie

Doggo - A collection of unstyled Phoenix components

I released Doggo, a collection of unstyled Phoenix components.

https://github.com/woylie/doggo

Features

  • Unstyled Phoenix components.
  • Storybook that can be added to your application, so that you can see the component with your own styles.

Goals

  • Follow proper HTML semantics.
  • Adhere to accessibility guidelines with appropriate ARIA attributes and roles.
  • Favor semantic HTML and ARIA attributes over CSS classes for style bindings to states, if possible.
  • The library is comes without default styles and does not prefer any particular CSS framework.

Why did I build it?

  • I regularly bootstrap new projects and needed a component library to quickly replace Phoenix’s tailwind-based components.
  • I prefer to solve UI problems once and use the solutions across projects.
  • I’m very comfortable writing my own CSS/SCSS and feel like I outgrow any CSS framework at some point in a project’s lifecycle.

What’s next?

  • Add stories for components that are not covered in the storybook yet.
  • Complete the base component set (#20).
  • Implement remaining APG patterns (#139).
  • Add keyboard interaction (#136).
  • Improve conformance to WAI-ARIA and WCAG.

So far, all components are plain Phoenix components without any JavaScript. For some accessibility patterns, especially those involving keyboard interaction, it may be necessary to introduce some JavaScript in the future. I might also consider introducing more complex (live) components.

Most Liked

adw632

adw632

I have written many times my struggles on here that web UI is a huge gap and undermines Phoenix as a viable way to build apps fast. Phoenix isn’t fast vs other solutions which have established UI frameworks.

A set of semantic headless components that address accessibility is the missing piece in the ecosystem and now, with Doggo you have made great strides to closing that gap. Well done and thank-you for your efforts.

I’ve actually moved to using web components / custom elements because of this gap (Shoelace and Adobe Spectrum with the what looks to be amazing Spectrum 2 just around the corner).

IMO Doggo should be seriously considered by the Phoenix core team as a foundation library given there is nothing other than the “stop gap” core components which are not fit for purpose and create a maintenance issue for phoenix apps.

If Phoenix had a set of core semantic components which implement all the accessibility requirements correctly and cover the common application use cases then tools, generators, CSS frameworks, themes, application website templates, UI design/figma templates, and real storybook collaboration with design teams can thrive within the Phoenix ecosystem.

Without a core semantic UI component library Phoenix and liveview will remain a fringe hobby web technology with low adoption because the gap between UI design teams and dev teams is too large as they cant work effectively or efficiently together. Phoenix in effect slows you down vs just using react or next.js or any other popular solution that has established UI components and real storybook support out of the box to close the gap between design intent and devs.

14
Post #7
woylie

woylie

Doggo 0.5.0 focuses on the semantics of the remaining APG patterns. Note that not all added components are fully functional yet: client-side interactivity including keyboard support will be the next focus. Components that are not ready to be used yet are marked with admonition blocks in the documentation.

Added

  • New component: Doggo.alert_dialog/1.
  • New component: Doggo.carousel/1.
  • New component: Doggo.combobox/1.
  • New component: Doggo.disclosure_button/1.
  • New component: Doggo.menu/1.
  • New component: Doggo.menu_bar/1.
  • New component: Doggo.menu_button/1.
  • New component: Doggo.menu_group/1.
  • New component: Doggo.menu_item/1.
  • New component: Doggo.menu_item_checkbox/1.
  • New component: Doggo.menu_item_radio_group/1.
  • New component: Doggo.radio_group/1.
  • New component: Doggo.split_pane/1.
  • New component: Doggo.tabs/1.
  • New component: Doggo.toolbar/1.
  • New component: Doggo.tree/1.
  • Storybook page about modifier classes.
  • Mix task mix dog.modifiers to list all modifier classes.

Changed

  • Set aria-invalid and aria-errormessage attributes in Doggo.input/1
    component.
  • Use buttons instead of links in Doggo.action_bar/1.
  • Add toolbar role to Doggo.action_bar/1.
  • Use section instead of article in Doggo.modal/1.
  • Use button for close button in Doggo.modal/1.
  • Add dismissable attribute to Doggo.modal/1.
  • Remove role from button_link/1, add class.
  • Rename Doggo.drawer/1 slots to header, main, and footer.
  • Rename Doggo.drawer_nav/1, Doggo.drawer_nav_nested/1 and
    Doggo.drawer_nav_section to Doggo.vertical_nav/1,
    Doggo.vertical_nav_nested/1 and Doggo.vertical_nav_section/1.
  • Depend on phoenix_storybook ~> 0.6.0.
woylie

woylie

I just released Doggo 0.9.0. Since I didn’t announce the releases in between, just a brief summary:

  • Various components have seen improvements, including documentation, stories, and customizability, and bumps in maturity levels.
  • Example CSS has been added for some components and will be added for the remaining components in the future. Links to the CSS files have been added to the component docs on Hex.
  • The demo application has been deployed and is available at https://woylie-doggo.fly.dev/.
  • mix dog.classes and Doggo.classes/1 have been added to retrieve all classes used in the configured components. Unlike the previous mix dog.modifiers and Doggo.modifier_classes/1, the output includes the base classes, the nested classes based on the base class, customizable additional classes, and configured modifier classes.

Where Next?

Popular in Announcing Top

mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
tmbb
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps: bureaucrat - which contains a bunch ...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
622 18934 194
New
RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 12645 134
New
Flo0807
Hello everyone! I am excited to share our heart project Backpex with you. After building several Phoenix applications, we realized that...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
marcuslankenau
I feel kind of stuck with the absence of a proper xml library for Elixir. Currently I use SweetXML which was ok for me more or less to pa...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement