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

General: Enhanced enum def items #4295

Merged
merged 8 commits into from
Jan 17, 2023
Merged

Conversation

iLLiCiTiT
Copy link
Member

Brief description

Atrribute definition EnumDef has more specifically defined value and label.

Description

The previous implementation expected dictionary where key is value and value is label which is unintuitive. This logic was kept for backwards compatibility (at least for time there are opened PRs which use EnumDef that way. Added option to pass list where each item is dicrionary with "value" and "label" to make it more explicit.

Changed items in currently used EnumDef to use explicit items.

Testing notes:

  1. Create editorial should show correct enum items
  2. Workfile builder should show corrent enum items

@iLLiCiTiT iLLiCiTiT self-assigned this Jan 9, 2023
@iLLiCiTiT iLLiCiTiT added the type: enhancement Enhancements to existing functionality label Jan 9, 2023
@kalisp kalisp self-requested a review January 17, 2023 10:33
Copy link
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

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

Other than implicit KeyError it seems to work. Tested on Transcoding addon, conversion from legacy works.

@iLLiCiTiT iLLiCiTiT merged commit 42dccc0 into develop Jan 17, 2023
@iLLiCiTiT iLLiCiTiT deleted the feature/enhanced_enum_def branch January 17, 2023 12:57
@github-actions github-actions bot added this to the next-patch milestone Jan 17, 2023
@jakubjezek001 jakubjezek001 modified the milestones: next-patch, 3.15.0 Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants