Skip to content

feat(highlight): Change cursor in Highlight Text mode#544

Merged
mergify[bot] merged 3 commits intobox:masterfrom
mingzexiao6:add-highlight-cursor
Jul 28, 2020
Merged

feat(highlight): Change cursor in Highlight Text mode#544
mergify[bot] merged 3 commits intobox:masterfrom
mingzexiao6:add-highlight-cursor

Conversation

@mingzexiao6
Copy link
Contributor

@mingzexiao6 mingzexiao6 commented Jul 27, 2020

  • Tests

@mingzexiao6 mingzexiao6 requested a review from a team as a code owner July 27, 2020 23:34
@mingzexiao6 mingzexiao6 marked this pull request as draft July 27, 2020 23:34
@mingzexiao6 mingzexiao6 force-pushed the add-highlight-cursor branch from 4760fbb to ab9ec85 Compare July 28, 2020 00:37
@mingzexiao6 mingzexiao6 marked this pull request as ready for review July 28, 2020 00:37
@mingzexiao6 mingzexiao6 force-pushed the add-highlight-cursor branch from ab9ec85 to f10c5be Compare July 28, 2020 00:38

// Construct a layer element where we can inject a root React component
const rootLayerEl = documentEl.createElement('div');
rootLayerEl.classList.add('ba-Layer');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any concerns about rendering this layer even though the feature is not yet available?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the toolbar highlight button is not clicked, we actually only render a <div /> with absolute positioning and pointer-event: none. So I don't have any concerns.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. I think @ConradJChan had some concerns about rendering these components unconditionally, but I don't recall why. It should be okay for now, but we'll need to keep this in mind if we add anything else outside of the "creator" components.

jest.mock('../../common/withProviders');
jest.mock('../HighlightAnnotations');

describe('HighlightContainer', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we follow the path format here? I'd also be game for nuking the path entirely and just using the component name. Maintaining the path here seems tedious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will nuke the path entirely in the followup pr.

Copy link
Collaborator

@jstoffan jstoffan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just make super sure there are no regressions for region annotations.

@mergify mergify bot merged commit 9535ee4 into box:master Jul 28, 2020
@mingzexiao6 mingzexiao6 deleted the add-highlight-cursor branch August 13, 2020 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants