-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix: Fallback value of title used for component feedback when _feedback.title not set (509) #510
Conversation
…_feedback.title not set
Could we resolve these issues please? These fallback keep coming and going:
It seems it must be possible to leave the feedback Why should the feedback title default to the question The only way I can reconcile this in my head is to set the schema feedback title to default to const feedbackConfig = {
altTitle: feedback.altTitle ||
Adapt.course.get('_globals')._accessibility.altFeedbackTitle ||
'',
title: Handlebars.compile(feedback.title || '', this.toJSON()),
_classes: feedback._classes,
...(isLegacyConfig
? getLegacyConfigObject()
: getConfigObject()
)
}; |
Yes, I'm a little confused as to the actual code around
This is driven by user expectations from how it was working before and the helper text found on many components, e.g. https://github.com/adaptlearning/adapt-contrib-mcq/blob/master/properties.schema#L243 |
Notify requires a title as this is used to label the Notify 'dialog' popup (see ticket for ref). If we're providing a fallback title ( |
Including @chris-steele |
Taking a look at the hbs file, it seems we are reading the models I'll add this to the current PR for a bit of a cleanup, but we should definitely resolve what our fallbacks are and in which order |
I've updated the PR to simplify the hbs by pushing display logic more on the view. We still have the decision to make over the fields we sequentially fall back on for the feedbackTitle field that gets resolved here though, but hopefully it's now easier to see that order |
Thanks @cahirodoherty-learningpool, this is much clearer. When I update to your latest commit however no title is rendering for me regardless which title I set (title, altTitle or altFeedbackTitle). In terms of order, I'd propose the following: Reviewing some recent courses, I find feedback title text is one of the following: If we want to use the component |
… has it available
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 PR is included in version 6.46.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Fixes #509
Fix