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

[Task]: Hope UI 1.0 Release Checklist #187

Open
fabien-ml opened this issue Aug 4, 2022 · 19 comments
Open

[Task]: Hope UI 1.0 Release Checklist #187

fabien-ml opened this issue Aug 4, 2022 · 19 comments
Labels
v1.0 The issue will be addressed in Hope UI 1.0 WIP Work in progress

Comments

@fabien-ml
Copy link
Collaborator

fabien-ml commented Aug 4, 2022

1.0 Release Checklist

The following is an in progress list of remaining tasks before the release of 1.0 which is a complete rewrite of the library.

UI Components

In v1.0

Unstyled (Kobalte) Styled (Hope UI)
Button
IconButton N/A
CloseButton N/A
Divider
Checkbox
Input
MultiSelect
Radio
Select
Switch
Textarea
Accordion
Avatar
Badge N/A
Icon N/A
Image N/A
Kbd N/A
List N/A
Table N/A
Tag N/A
Anchor
Breadcrumbs
Tabs
Alert
Progress
RingProgress N/A
Skeleton N/A
Spinner N/A
Toast
Drawer
Menu
Modal
Popover
Tooltip

In v1.x

Unstyled (Kobalte) Styled (Hope UI)
AutoComplete
Calendar
DatePicker
TimePicker
FileButton N/A
FileInput N/A
ToggleButton
NumberInput
PasswordInput N/A
Slider
RangeSlider
Card N/A
Timeline N/A
Pagination
Stepper N/A
@fabien-ml fabien-ml added the v1.0 The issue will be addressed in Hope UI 1.0 label Aug 4, 2022
@fabien-ml fabien-ml pinned this issue Aug 4, 2022
@hope-ui hope-ui locked and limited conversation to collaborators Aug 4, 2022
@hope-ui hope-ui unlocked this conversation Aug 5, 2022
@fabien-ml fabien-ml added the WIP Work in progress label Sep 24, 2022
@martinpengellyphillips
Copy link

martinpengellyphillips commented Oct 30, 2022

@fabien-ml I'm going to start converting one of my personal projects to Hope UI rewrite and then use that to focus me on contributing back (e.g implementing some of the remaining components).

Before I get started - which branch should I work from / any other things to keep in mind?

Update
Ah, I just read #240 (comment) and see you want to do the code on your own. Let me know if you change your mind in future :)

@fabien-ml
Copy link
Collaborator Author

@martinpengellyphillips you can start from the develop branch.

To create a component that support Hope-ui theming you need to learn about this https://next--hope-ui.netlify.app/docs/theming/style-config-api.

I'm open to PR, but I want to keep control over the UI design.

The visual style takes inspiration from Mantine and TailwindUI design.

@fabien-ml
Copy link
Collaborator Author

fabien-ml commented Oct 30, 2022

Also I'm currently on the FormControl and Input component, so choose others 😅.

@fabien-ml
Copy link
Collaborator Author

👋, For anyone who's looked at this issue and haven't seen any progress for weeks, it's because I've decided to pull the heavy work done on the complex components into another (headless) library that will be used by Hope-UI under the hood.

The repo is here: https://github.com/fabien-ml/kobalte

@apollo79
Copy link

apollo79 commented Dec 9, 2022

wave, For anyone who's looked at this issue and haven't seen any progress for weeks, it's because I've decided to pull the heavy work done on the complex components into another (headless) library that will be used by Hope-UI under the hood.

The repo is here: https://github.com/fabien-ml/kobalte

Oh, this is cool! Thanks for the info!
Any timeline for both libraries?

@marbemac
Copy link

👋, For anyone who's looked at this issue and haven't seen any progress for weeks, it's because I've decided to pull the heavy work done on the complex components into another (headless) library that will be used by Hope-UI under the hood.

The repo is here: https://github.com/fabien-ml/kobalte

Love it! Had been hoping to use https://github.com/tw-in-js/twind with hope-ui, but saw that Stitches was hardcoded. Sounds like this change in direction should allow for something like twind.

Curious - re headless patterns, are you leaning more towards the Radix approach, or React Aria approach?

@fabien-ml
Copy link
Collaborator Author

@marbemac it will be more like the DX of radix (component based), the API is very inspired from radix, but the a11y features are from react-aria.

It's a mix of what I've learned from radix, ariakit and react-aria codebase.

I've also made a tailwind plugin for easy styling but not sure if it apply to twind

@fabien-ml
Copy link
Collaborator Author

fabien-ml commented Dec 14, 2022

Oh, this is cool! Thanks for the info!
Any timeline for both libraries?

@apollo79 for Kobalte (the headless lib) i expect a v0.1.0 in the first week of January 2023 with the following components:

  • Button
  • ToggleButton
  • Alert
  • Link
  • Listbox
  • RadioGroup
  • CheckboxGroup
  • Switch
  • Dialog
  • Popover
  • HoverCard
  • Tabs
  • Select (single and multi-select)
  • Menu (with nested and context menu support)

Then the "styled" version will be integrated in Hope-UI, but I haven't planned this part yet.

@apollo79
Copy link

Oh, this is cool! Thanks for the info!
Any timeline for both libraries?

@apollo79 for Kobalte (the headless lib) i expect a v0.1.0 in the first week of January 2023 with the following components:

* Button

* ToggleButton

* Alert

* Link

* Listbox

* RadioGroup

* CheckboxGroup

* Switch

* Dialog

* Popover

* HoverCard

* Tabs

* Select (single and multi-select)

* Menu (with nested and context menu support)

Then the "styled" version will be integrated in Hope-UI, but I haven't planned this part yet.

Nice! Can't wait for Hope-UI v1!

@potikhanovsergey
Copy link

Do you plan to create datepicker component for kobalt anytime soon?

@fabien-ml
Copy link
Collaborator Author

Yes, there is a good date picker in react-aria that I would like to recreate in Kobalte, and then add the styled version to Hope UI.

@potikhanovsergey
Copy link

Waiting for it, thanks)

@marbemac
Copy link

marbemac commented Jan 10, 2023

@fabien-ml I'm starting work on a foundational stack that I'll be using for new products moving forward, and am currently planning to use twind (with similar approach to your Kobalte tailwind plugin with the ui-x pseudo selectors to target state, which is brilliant).

Given this, I am trying to decide the best course forward:

a) Build my own component library on top of Kobalte (effectively, hope-ui, which seems kind of redundant).
b) Put this effort towards helping hope-ui, assuming you are open to contributors at this stage (I know, it's early in the v1 lifecycle so I understand if you just want to get it to a more stable point first)

I just did a POC for (a) - creating a simple Button component with Kobalte + Twind - and effectively I ended up copying most of the Hope UI button code and just swapping out the stitches styling bits for twind driven styles.

For B, I was wondering if perhaps hope-ui could somehow still allow for the classes/styles to be swapped out / driven by something other than stitches?

Using the Button component as an example, all of the parts (root, icon, loader, content, etc) grab their classes from functions exposed on a context provider that wraps the button. What if that context provider was instead at the root (HopeProvider), similar to how the custom component theming is working right now. One would be expected to supply an object that supplies these class/style generator functions for all hope components. And then all of the stitches (or tailwind, whatever hope-ui ends up defaulting to) code is moved to a separate package that folks can use for easy mode.

Just an idea as I dig into Hope UI and Kobalte - not sure what your plans are in general for styling for the Hope UI + Kobalte combo that you are probably working on now. Also haven't completely thought this through so there might be complexities or trade-offs I've missed 😅.

PS - if this is better as a separate discussion or issue please feel free to move it!


Back of the napkin example:

/**
 * Current code that's inside `button.tsx`. Generates class names via stitches, 
 * exposes those over a local button context provider.
 */
const { baseClasses } = useButtonStyleConfig("Button", styleConfigProps);
<ButtonContext.Provider value={{ baseClasses }}>
  // Actual button
</ButtonContext.Provider>

/**
 * Instead, a more generic call to a helper that under the hood grabs the object 
 * with the button part class names, from the root provider context.
 * 
 * useStyleConfig(hopeComponent: "Button" | "Dividier" | "Heading" | "Modal" ...etc, styleConfigProps: RelevantPropsForHopeComponent)
 */
const { baseClasses } = useStyleConfig("Button", styleConfigProps);

/**
 * Required `styles` object passed into root HopeProvider, for `useStyleConfig` to access.
 * 
 * `defineStyles` wrapper mostly for typing support.
 */
const styles = defineStyles({
  components: {
    Button(props: ButtonStyleConfigProps): Record<ButtonPart, string> {
      return {
        root: '',
        icon: '',
        leftIcon: '',
        rightIcon: '',
        loaderWrapper: '',
        loaderIcon: ''
      }
    }
    // ... the rest of the hope components
  },
});

// Pass the styles config into HopeProvider
const App = () => {
  return (
    <HopeProvider styles={styles}>
      // ..
    </HopeProvider>
  )
}

So refactoring the existing stitches based styling to this system might look something like this:

// @hope-ui/stitches
export const styles = defineStyles({
  components: {
    Button(props: ButtonStyleConfigProps): Record<ButtonPart, string> {
      // the same `useButtonStyleConfig` that is currently inside of `button/button.styles.ts`
      return useButtonStyleConfig(props).baseClasses;
    }
  },
});

Or tailwind based styles...

// @hope-ui/tailwind
const styles = defineStyles({
  components: {
    Button(props: ButtonStyleConfigProps): Record<ButtonPart, string> {
      return {
        root: cx({
          'bg-red': props.variant === 'danger',
          // ... etc,
        }),
        icon: '',
        // ... etc
      }
    }
  },
});

What's cool about this is that Hope UI is still building on top of Kobalte to provide a more opinionated set of ready to go components, while still allowing those that want to swap out the styling solution to do so.

@fabien-ml
Copy link
Collaborator Author

@marbemac sorry for the late response.
I think you'd better building your own components on top of Kobalte, more control over the API design, the tools you want to use and the visual style.

I'm a bit sick and tired of CSS-in-JS, "being Chakra ui like", style props API and all the problems that come with (performance, SSR, TypeScript intellisense, the Stitches css-in-js lib used which is almost dead project, etc).

My goal with Hope UI was to bring some well designed, accessible components, ready to use for people without any design skills, for creating PoC, side project etc. But currently I spend most of my time fighting with the problems above instead of building components. While building v0.x a year ago I've found the "Chakra ui like" API interesting, but there are so many drawback that i'm tired of.

@fabien-ml fabien-ml unpinned this issue Jan 17, 2023
@marbemac
Copy link

np, thank you for the response!

@fabien-ml
Copy link
Collaborator Author

fabien-ml commented Jan 19, 2023

After weeks of reflexion I've decided to move Hope UI away from CSS-in-JS and stop being a "Chakra UI like" library.

Starting from v1.0.0-beta.1 :

  • Hope UI will ship with a good old CSS file.
  • Style props API will be removed (can be done with a css utility library like TailwindCSS).
  • Layout components will be removed (can be done with a css utility library like TailwindCSS).
  • Theming API will be different (no info yet)
  • v0.x will be deprecated.
  • Documentation of v0.x will be hosted at v0.hope-ui.com
  • hope-ui.com will be the documentation of v1.0.0-beta.1

The v1.0.0-beta.1 is a 180° turn (almost a completely new library), migration from v0.x and v1.0.0-next.x will be very hard.
Because of this I don't recommend to start a new project from those version now.

I apologize for the problems that this announcement will cause to ongoing project using Hope UI, but as I've mentioned in comments above I'm tired of all CSS-in-JS related problem and don't want to invest more free time on this.

In conclusion, starting from v1.0.0-beta.1 Hope UI will be a UI library mainly focusing on providing well design, accessible components for projects that don't have specific design opinions, don't care about design (just want something that looks good) or PoC.

If you want to build something highly customizable I recommend moving to an headless library like Kobalte.

@fabien-ml
Copy link
Collaborator Author

Hi everyone and sorry for not communicating since January, here is some update about the future of Hope UI.

  • All components needed to reach feature parity with v0.x are done in Kobalte (the headless lib), with major improvement arround accessibility and stability.
  • The work on the new version powered by Tailwind CSS has started.

However since it's almost a new project from zero and to avoid confusion, i've decided to move it to another org and with a new name.

So the official successor of Hope UI, can be found here: https://github.com/kobaltedev/pigment

@FlorianDevPhynix
Copy link

I would like to suggest changing the documentation and Readme to properly indicate that development on Hope UI stopped indefinitely and there is this new successor. I only found out about this because I read this Issue, but not everyone does or wants to do that, it's fairly long. There's also multiple warnings that a rewrite is in progress. The project looks very much alive, if you never see any of this.

@danielo515
Copy link

danielo515 commented Aug 19, 2023

Any migration guide?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.0 The issue will be addressed in Hope UI 1.0 WIP Work in progress
Projects
None yet
Development

No branches or pull requests

7 participants