Skip to content

Conversation

@AlexPalaz
Copy link
Collaborator

✅ What's been done

Added validation for categories to filter out invalid/unknown categories during data processing and in the UI.


✨ Features

  • Category validation: Invalid categories (like no_such_category) are automatically filtered out during data processing and in the UI multiselect component.

💥 Breaking changes

None.

@AlexPalaz AlexPalaz requested a review from valeriocomo October 24, 2025 13:16
@vercel
Copy link

vercel bot commented Oct 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
publiccode-editor Ready Ready Preview Oct 24, 2025 1:16pm

Copy link
Member

@valeriocomo valeriocomo left a comment

Choose a reason for hiding this comment

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

LGTM

@valeriocomo
Copy link
Member

fix #517

@valeriocomo valeriocomo merged commit b08b045 into main Oct 24, 2025
9 checks passed
@valeriocomo valeriocomo deleted the fix/517-check-invalid-categories branch October 24, 2025 13:27
@bfabio
Copy link
Member

bfabio commented Oct 29, 2025

Hello @AlexPalaz, @valeriocomo this does popup a dialog that says "unknown fields removed: categories", which is misleading. categories is not an unknown field:

image

Interestingly, if you try and load a file with an invalid category AND a valid one, such as:

categories:
  - no_such_category
  - accounting

it gets autofixed and no dialog is shown.

I think all the "autofixes" are better served shown via the warning pane, so they are uniform and all in the same spot:
image

@valeriocomo
Copy link
Member

Hello @AlexPalaz, @valeriocomo this does popup a dialog that says "unknown fields removed: categories", which is misleading. categories is not an unknown field:

image Interestingly, if you try and load a file with an invalid category AND a valid one, such as:
categories:
  - no_such_category
  - accounting

it gets autofixed and no dialog is shown.

I think all the "autofixes" are better served shown via the warning pane, so they are uniform and all in the same spot: image

@bfabio could you create a new issue?

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.

3 participants