Skip to content

refactor: Categories to first class Objects #1584

@Piinks

Description

@Piinks

Original: flutter/flutter#119139


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:

  • CategoryResponse
  • NewsDataSource
  • GoogleNewsTemplateClient
  • BlockAction
  • feed/index.dart
  • All related tests

In App:

  • CategoriesState and Events
  • Feed widget and Bloc
  • Navigation
  • Notification Preferences
  • NewsRepository
  • NotificationRepository
  • All related tests

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions