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

Don't show empty metadata sections and create an empty state for metadata in general #1197

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

dzonidoo
Copy link
Contributor

@dzonidoo dzonidoo commented Dec 11, 2024

NHUB-610

Purpose

For the ‘Category’ section we show the label even if there are no values available. This is not consistent wit other metadata fields. The sections should be hidded if there is no data available

What has changed

Rendering of metadata fields

Steps to test

  1. Open an article panel
  2. Scroll to the metadata section

Checklist

  • This pull request is not adding new forms that use redux
  • This pull request is adding missing TypeScript types to modified code segments where it's easy to do so with confidence
  • This pull request is replacing lodash.get with optional chaining for modified code segments

Resolves: #[issue-number]

@petrjasek petrjasek added this to the v2.9 milestone Dec 11, 2024
Copy link
Member

@tomaskikutis tomaskikutis left a comment

Choose a reason for hiding this comment

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

All good, except when using conditionals or ternary expressions the condition should be a boolean e.g.
result = <boolean> ? a : b and not result = <number> ? a : b

@dzonidoo
Copy link
Contributor Author

yes ure right... ill change taht one and then merge

@dzonidoo dzonidoo merged commit 4a63c48 into superdesk:develop Dec 16, 2024
9 checks passed
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