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

refactor: convert single category to multiple categories #2288

Merged
merged 22 commits into from
Feb 28, 2024

Conversation

sgoudham
Copy link
Contributor

@sgoudham sgoudham commented Feb 25, 2024

Description

This PR adds more specific categories for ports to be listed against. I've tried to adopt an approach that is used in app stores where you have the concept of a primary and secondary category, but modified it to be a bit less strict.

The category string has been removed in favour of the categories array, and the first element of this array should be the most specific category, with the rest of the elements decreasing in priority.

This is basically modeled for weighted fuzzy searching, where the first element has the greatest weight and the rest have smaller weights. For further information on this, see #2230 (comment)

Goals

  • Make searching the README more like an "app-store" experience.
  • Make it easy for applications to implement a search bar over Catppuccin's ports.

Non Goals

  • Make it harder for people to find applications.
  • Cause confusion when people update the ports.yml with new ports

Release Process

I think the following steps are what need to be done for a "smooth" release:

  • Raise Draft PR on catppuccin/catppuccin
  • Raise Draft PR on catppuccin/userstyles with categories updated and schema pointing to the catppuccin/catppuccin draft PR.
  • Update Draft PR on catppuccin/catppuccin to pull in new catppuccin/userstyles changes and merge.

The reason why this is a pain is because the schemas in both repositories depend on each other, leading to a circular dependency of sorts. It might be worth to extract out the categories into a different file/schema file entirely to somewhat mitigate this issue going forward.

Edit: Thinking about it again, I don't think the merge needs to be as complicated as that since the commits are pinned, but I would like to release the changes as a set instead of one after the other.

Preview PR README.md


Closes #2230

Not Found
@rubyowo
Copy link
Member

rubyowo commented Feb 25, 2024

BTW tty should be under the terminals category.

@sgoudham sgoudham marked this pull request as ready for review February 28, 2024 01:40
Copy link
Contributor Author

@sgoudham sgoudham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think I'm done for now, some notable changes aside adding new categories:

It's somewhat frustrating that technically adding/removing categories is technically 2 PRs in catppuccin/catppuccin and 2 PRs in catppuccin/userstyles if you want to release them together but we can figure out how to make that nicer later on.

Next Steps

  1. Merge this PR
  2. Update draft PR on catppuccin/userstyles to bring in the merged commit hash and merge
  3. Raise a PR in catppuccin/catppuccin to update its userstyles commit hash to the merged one in catppuccin/userstyles

@sgoudham sgoudham force-pushed the docs/allow-multiple-categories branch from 97b5361 to 428223b Compare February 28, 2024 02:26
Copy link
Member

@unseen-ninja unseen-ninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from that one question this looks solid to me! <3

resources/ports.schema.json Show resolved Hide resolved
@sgoudham sgoudham changed the title refactor: add more specific categories refactor: convert single category to multiple categories Feb 28, 2024
@sgoudham sgoudham merged commit 35662db into main Feb 28, 2024
1 check passed
@sgoudham sgoudham deleted the docs/allow-multiple-categories branch February 28, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ports.schema.json: allow multiple categories
3 participants