-
Notifications
You must be signed in to change notification settings - Fork 45
feat(ClauseHeader): added tooltips to icons #318
feat(ClauseHeader): added tooltips to icons #318
Conversation
@irmerk @DianaLease Please review! |
This looks good @elit-altum. I have a few suggestions though
|
Thank you for the review. Actually most of these values are controlled by props passed to the component. Thereby, they will be changed accordingly. |
Tagging @Michael-Grover @dselman @jeromesimeon @DianaLease @mttrbrts for feedback |
@irmerk any suggestions on this? |
Applications that use the Cicero UI handle the tooltips on clause templates on their own. I am not sure how this will effect that. Does this remove the green border and border radius around clause templates? Something appears to be wrong with icon buttons the buttons in the PR. Only a very small area is clickable. |
Not sure what this is referring to, could you elaborate?
Yes this PR does do that. |
I would imagine having this as low level as possible would be best. The icon exists in |
@Michael-Grover The icon issue might be due to the fact that I reduced the icon sizes to be equivalent in proportions. I'd revert them back on. |
Yes @Michael-Grover the borders and margins are handled. Do you want me to increase the spacing ? |
in that case, @elit-altum please make the styling of the tooltips match this by increasing the padding and adding rounded corners: Please undo all changes unrelated to the tooltip improvements, such as "Modified the ClauseBackground UI according to the proposed changes." . I believe proposed UI changes should be made in separate github issue so the community can discuss them individually. Some applications that use Cicero UI will be affected by these changes so we also want to give them the opportunity to comment. |
All right, no problem! |
@Michael-Grover made the changes to the tooltip and reverted the others |
@elit-altum There is still some issue with the viewbox or something where the icon isn't consistently clickable on hover. |
Yes @irmerk just fixed it! Please review! |
src/components/ClauseComponent.js
Outdated
onMouseOver={() => setHoveringTestIcon(true)} | ||
onMouseOut={() => setHoveringTestIcon(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.
These should be in wrappers instead of the icons themselves. The issue is the mouse going over the explicit lines in the svg
are toggling this, instead of the whole area of the icon itself.
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.
@irmerk Is the issue still there ? I think it's fixed in this commit please check once at https://deploy-preview-318--cicero-ui.netlify.com/
I have nested this along with the svg
because the hover is on that as well. Therefore, for a coherent behavior that the tooltips are only seen when the cursor is over the icon and the hover effect takes place. I implemented this.
Previously, I used the IconWrapper
only
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.
Yes, still there. I'm saying this should look like:
<S.EditWrapper
onMouseOver={() => setHoveringEditIcon(true)}
onMouseOut={() => setHoveringEditIcon(false)}
{...iconWrapperProps}
>
<S.ClauseIcon {...editIconProps}>
for all the icons.
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.
@irmerk I have made these changes. Please review!
Hmm the behavior is still there. Unsure what it is, will need to look into it more and I can take a look later today or tomorrow. |
I'm going to take a look locally... |
39ec021
to
513cf7a
Compare
@irmerk I thinks it's fixed. Works fine on my Firefox and Chrome. Please check once! |
src/components/ClauseComponent.js
Outdated
onMouseEnter={() => setHoveringTestIcon(true)} | ||
onMouseLeave={() => setHoveringTestIcon(false)} | ||
onClick={testIconProps.onClick} |
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 onClick
here should be () => clauseProps.CLAUSE_TEST_FUNCTION(props)
, and then that function should be removed from testIconProps
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.
Okay will do!
628ad35
to
56de8d3
Compare
@irmerk I have made the required changes. If this is okay I'll proceed to squash my commits (if required) |
Sorry just one last thing: Yeah I think squashing some of the commits together could be good with interactive rebase. If it makes sense to squash all of them then go ahead. |
Signed-off-by: elit-altum <[email protected]>
44cedd1
to
f175f7d
Compare
@irmerk Squashed all commits. Please review! |
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 on the z-index
/ border-width
/ etc.
This looks great! I think just update the snapshots to pass the tests with npm test -- -u
Hmm are you able to run |
I've cloned your branch and it works... Are you not running |
That's weird. I ran |
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.
Looks great once the snapshot is updated!
Are you on our slack? Might be faster to communicate on this one. Need to debug this because this shouldn't be an issue. Just running |
Signed-off-by: irmerk <[email protected]>
I noticed a bug in this feature. I created an issue since this PR is already merged. #330 |
Signed-off-by: elit-altum [email protected]
Continues: accordproject/markdown-editor#124
Changes
Screenshot
Flags
Related Issues