Ghost/ghost/admin/app/components/labs/lexical.js
Elena Baidakova ca46308abe
Added logic for showing feedback form in Labs (#16831)
refs TryGhost/Team#3247
- The feedback form UI is hidden by default
- Enabling “Lexical editor” doesn’t show the feedback form
- Disabling “Lexical editor” shows the feedback form below this lab item
and user can send the feedback
- Refreshing the page or navigating to some other page and then back to
Labs → the form is hidden again
2023-05-19 13:15:25 +04:00

17 lines
696 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Component from '@glimmer/component';
import {action} from '@ember/object';
import {tracked} from '@glimmer/tracking';
export default class LabsLexicalComponent extends Component {
// - The feedback form UI is hidden by default
// - Enabling “Lexical editor” doesnt show the feedback form
// - Disabling “Lexical editor” shows the feedback form below this lab item and user can send the feedback
// - Refreshing the page or navigating to some other page and then back to Labs → the form is hidden again
@tracked isFeedbackFormVisible = false;
@action
toggleFeedbackForm(event) {
this.isFeedbackFormVisible = !event.target.checked;
}
}