-
Notifications
You must be signed in to change notification settings - Fork 36
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
Feat coverage profiles #2217
Feat coverage profiles #2217
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the task requires being able to configure a distinct content profile for each content type e.g. text, video, audio - the implementation itself at the database level or at data-structure level - should not be coupled to content type. If a new requirement came in tomorrow - that we want multiple profiles for a single content type - that shouldn't require us to do changes to database structure or data structures. It should be enough to adjust the UI in the modal.
I remember discussing this - that we'd retrieve profiles by ID - not content type with @petrjasek. Not sure if you @thecalcc wasn't participating in the discussion or you guys changed the approach.
field: getFieldNameTranslated(fields[0]).toUpperCase() | ||
})); | ||
} else { | ||
notify.error(gettext('At least one "{{fields}}" fields are required by the system', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
field {{name}} is required by the system
would be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code was actually kind of bad. I began reworking it, but it was tied to other bad code, then I realized that some stuff related to embeddedProfile
was no longer used now that I decoupled the coverage profiles. So I now have reworked it to work without this case, while achieving the same functionality in a better and more obvious way for the user - by notifying them about each required field
It's not actually coupled to the |
To add to my comment - now I think we should keep things as they are in the UI. Otherwise we need to either make some workaround (mock some static profiles so users can access the in the profile config) to prepare for a feature that may never come. And when it comes we can add more UI - a plus button to add coverage profiles dynamically, and endless |
we're ready for multiple on the backend, nothing changed in that regard |
@dzonidoo could you improve this PR to make button content left-aligned? See |
STT-111
Front-end checklist
memo
orPureComponent
to define new React components (and updates existing usages in modified code segments)lodash.get
with optional chaining and nullish coalescing for modified code segmentssuperdeskApi
)superdesk-ui-framework
andsuperdeskApi
when possible instead of using ones defined in this repository.planningApi
where it is possible to usesuperdeskApi
planningApi
)