I’ve loved playing around with the new widgets. I created this widget recently:
It pulls data from Github, gmail, and Reminders APIs and shows outstanding items to be addressed. I was thinking it would be nice to recreate something similar in a UITable inside the app, where clicking on one of these sections would load more rows in the table with additional context.
Basically a tabbed header inside a UITable like this:
I was just trying to create it and realized that there are a couple immediate limitations in UITables:
OnTaps can only be attached to entire rows, or button-type cells
Background color can’t be set per cell.
@simonbs Would be awesome to get those (hopefully not too complex) features added!
More broadly, I love the flexibility of the design of widgets w/ the new stacks interface, and would love to see similar mechanics in the construction of UITables. I know that some elements, like fonts, have already been brought over from widgets to UITable, so I’m hopeful there’s more plans to consolidate the 2 interfaces
Very cool widget! I appreciate the ideas and feedback.
I’ve been considering if it should be possible to present widgets full screen in the app. I think that could be used instead of the existing UITable API in mode cases and with just a few additions it could entirely replace it.
@simonbs Sounds powerful! I would then just request that you maintain the interactivity of tables. I’ve built a lot of interfaces around the ability to update a table’s rows while it is still presented, e.g. here is my task manager interface: https://imgur.com/a/oAZ4wJp
I would love to, but this is a pretty complex UI that’s built on a lot of code, some of which I’d need to pore through to make sure there’s not any personal data in.
The basic concept is to have a state associated with a UITable, and update that state, which then rerenders the table to reflect the changes. So in this table for example, part of the state is activeTab, and tapping on the tabs updates that value to the next tab, which is reflected in the table by the tabs switching.
I will try to post the core code I use for generating these tables at the least.