flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.3k stars 27.52k forks source link

refactor: Categories to first class Objects #119139

Open trevorplant opened 2 years ago

trevorplant commented 2 years ago

Description

Currently Categories in the API are enums. This piece of the information architecture is more likely to be defined in a CMS.

This could be achieved by having a Class Categories that contains a list of Category which are instantiated from data from the CMS. Category can have fields for id name and any other metadata.

Categories could also nominate the list or categories to display as tabs for nav.

The touch points would be: in API:

In App:

There is a fair bit of work but the increased flexibility would improve user adoption.

domesticmouse commented 2 years ago

Hey @trevorplant, do you have time to have a go at building a first draft of this capability?

FYI @workerbee22

kaiceyd commented 1 year ago

Adding a quick note that development has not yet started to address this issue, but it's been discussed and prioritized. I will keep this issue updated with any status changes.

kaiceyd commented 1 year ago

No status change at this time. We're still hoping to address this issue, but it is currently lower priority.

kaiceyd commented 1 year ago

No status change at this time, but this issue still has our attention. I will keep this issue updated with any status changes as we work through development enhancements for this toolkit.

flutter-triage-bot[bot] commented 1 year ago

This issue is assigned to @kaiceyd but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

flutter-triage-bot[bot] commented 9 months ago

This issue is assigned to @kevinburns426 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

flutter-triage-bot[bot] commented 6 months ago

This issue was assigned to @kevinburns426 but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.

elianortega commented 2 months ago

Hi everyone,

I wanted to revive this issue with some insights from my experience as an active user of the news toolkit. In both of my recent projects using the toolkit, I've consistently needed to create a new class for Category to elevate it to a first-class object.

I believe it's worth considering this change because, in most cases, a category requires at least a name and an id. These attributes often change over time due to special events or seasonal categories. I found the most efficient way to handle these changes is through the CMS or the Dart Frog server. However, for the app to support this flexibility, the easiest approach would be to treat Category as a first-class object within the app.