hedron-crystal / hedron

An extendable UI library in Crystal, with markup capabilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make custom widgets more intuitive

hanyuone opened this issue · comments

Currently, to make a custom widget, you have to:

  • Place the code for @display into @initialize in order for it to update properly
  • Define self.widget_name, self.init_markup
  • Use self.display instead of @display since @display is nilable and cannot really be made un-nilable

A problem that I've encountered when implementing button_tab is that the index won't update - since @display is stored as a variable, I have to manually update @display's properties. This is kind of a pain.

This issue is placed here to brainstorm suggestions as to how implementing custom widgets could be made easier for people to use.

EDIT: If anyone can make a custom app or two using HDML and custom widgets and link them to this repository, that would be great!