-
Notifications
You must be signed in to change notification settings - Fork 42
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(TMG-2609): Update web implementation for commenting entitlement #4029
base: master
Are you sure you want to change the base?
Conversation
bb5fa1c
to
fef9c66
Compare
fef9c66
to
6d774dd
Compare
6d774dd
to
e0292b5
Compare
if (!isEnabled && !isCommentEnabled) { | ||
content = <DisabledComments />; | ||
} else if (hasCommentingEntitlement) { | ||
content = ( |
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 just use conditional rendering? This pattern is... unusual
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.
The purpose of this pattern was to wrap different condition results within a user state wrapper.
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.
What are the benefits of using the user state wrapper versus conditional rendering?
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.
So, the user-state component is dealing with all user states (like hasAccess, isLoggedin, etc.). I've just tried to re-use the existing pattern.
871f42a
to
4c26b28
Compare
@@ -110,7 +110,7 @@ jobs: | |||
- run: | |||
name: Run Web Tests | |||
command: | | |||
lerna run test:web --stream --since -- -- --ci --bail --coverage | |||
lerna run test:web --since -- -- --ci --coverage --verbose --runInBand --logHeapUsage |
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.
So runInBand will probably help with memory usage, but it should also mean the tests run slower. Was this a required change?
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.
One comment, nothing major
8028854
to
a92a80c
Compare
855317e
to
7753887
Compare
Quality Gate passedIssues Measures |
Description
Please include a summary of the change along with relevant motivation and context.
JIRA-1234
Checklist
Screenshots (if appropriate):
Include screenshots if needed.