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
EZP-30525: Convert Browse Tab as a standalone ReactJS module #187
Conversation
62a0eab
to
364ce96
Compare
c9c0069
to
bc0732e
Compare
}).isRequired, | ||
onSelect: PropTypes.func.isRequired, | ||
onDeselect: PropTypes.func.isRequired, | ||
isSelected: PropTypes.bool.isRequired, |
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.
It has default so it's not required.
let icon = null; | ||
|
||
if (contentTypeIdentifier) { | ||
icon = <Icon name={contentTypeIdentifier} extraClasses="c-selected-content-item__icon ez-icon--small" />; |
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 not to use the ContentTypeIconComponent
?
method: 'HEAD', | ||
}); | ||
const bookmarkedStatusCode = 200; | ||
const notBookmarkedStatusCode = 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.
Can we change this and use always 200 with the response { bookmarked: true|false}
?
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.
Good idea, but I'll keep it like this, Because we need changes on the backend side as well. This work has not been planned yet.
8e1f35c
to
15bd637
Compare
ping @dew326 |
); | ||
|
||
useEffect(() => { | ||
checkCanSelectContent(location, toggleEnabledState); |
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.
Should we setIsSelectContentEnabled(false)
before checkCanSelectContent
?
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 is not the best idea in the world, because it will cause extra re-renders of a component. Another effect is basing on changes of isSelectContentEnabled
flag.
import PopupComponent from '../../../common/tooltip-popup/tooltip.popup.component'; | ||
import { createCssClassNames } from '../../../common/css-class-names/css.class.names'; | ||
|
||
const noConfirmedContentTitle = Translator.trans( |
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.
some variables holding translations text use UPPER_CASE, and here we have camelCase, is this intended? :)
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.
Good catch. I'll correct that here and there.
https://jira.ez.no/browse/EZP-30525
Things done