-
Notifications
You must be signed in to change notification settings - Fork 12
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
fixeat(SFINT-3295): Improve UserActions interactivity #81
Conversation
We want to be able to use the UserAction without him being tied to the ResponsiveComponentManager and without creating a ResponsiveHeaderButton.
this.renderNoActions(); | ||
} | ||
} catch (e) { | ||
if (e && e.statusCode === 404) { |
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.
Wanted to use optional chaining, was not able because of prettier, so #80 should fix it and allow latest TypeScript features to be used.
this.renderNoActions(); | ||
} | ||
} catch (e) { | ||
if (e && e.statusCode === 404) { |
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.
Why are we only checking for status code 404?
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.
I think we're still considering the others status code, but do not wish to take special action for them other than render no actions.
I'm guessing that if https://platformqa.cloud.coveo.com/docs/?api=Reveal#!/User32Profiles/rest_organizations_paramId_machinelearning_user_actions_post answer 404, it means the feature is not enabled on the client organization.
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.
I like it
Changes
Add useResponsiveManager option
Add a useResponsiveManager option, default to true. Previous behaviour is kept, meaning that if you have hidden, the useResponsiveManager will be inoperant because hidden does super-seed it.
It allows SFINT to use the UserActions without hooking it to the ResponsiveComponentManager, will preserving its other functionality.
Add events for show and hide of the UserActions panel
Allow other components to be notified of when the UserActions panel is shown or hidden.
It allows SFINT to sync up the state of the ToggleActionButton with the panel when the latter get closed by something else than the button (e.g. query)
Tests