Skip to content
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(highlight): Render promoter tooltip #557

Merged
merged 1 commit into from
Aug 27, 2020
Merged

Conversation

mxiao6
Copy link
Contributor

@mxiao6 mxiao6 commented Aug 20, 2020

No description provided.

src/store/selection/actions.ts Outdated Show resolved Hide resolved
src/icons/IconHighlight.tsx Outdated Show resolved Hide resolved
src/document/DocumentAnnotator.ts Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.tsx Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.tsx Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.scss Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.scss Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.scss Outdated Show resolved Hide resolved
src/components/Popups/messages.ts Outdated Show resolved Hide resolved
src/document/DocumentAnnotator.ts Outdated Show resolved Hide resolved
@@ -0,0 +1,94 @@
import * as React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a convention for folder names? Seems like most folders are lowercased

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is my bad. I used PascalCase for the component folder names due to old habit. They should be hyphenated lowercase, instead. Seems like something to change in a separate PR, though.

src/components/Popups/PopupHighlight.tsx Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.tsx Outdated Show resolved Hide resolved
const { x, y, height, width } = rect;

const reference = {
getBoundingClientRect: () => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Was going to ask if you could use the DOMRect constructor but IE (https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this be worth a simple polyfill so we can use the constructor style? We use it in several places now, iirc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. I will submit a separate PR to address this.

src/components/Popups/PopupHighlight.tsx Show resolved Hide resolved
@mxiao6 mxiao6 force-pushed the add-promoter branch 2 times, most recently from 874cd84 to adbe203 Compare August 26, 2020 18:05
src/highlight/HighlightAnnotations.tsx Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.tsx Show resolved Hide resolved
const { x, y, height, width } = rect;

const reference = {
getBoundingClientRect: () => ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this be worth a simple polyfill so we can use the constructor style? We use it in several places now, iirc.

src/components/Popups/PopupHighlight.tsx Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.tsx Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.scss Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.scss Outdated Show resolved Hide resolved
@mxiao6 mxiao6 marked this pull request as ready for review August 27, 2020 05:42
@mxiao6 mxiao6 requested a review from a team as a code owner August 27, 2020 05:42
i18n/en-US.properties Show resolved Hide resolved
src/components/Popups/PopupHighlight.scss Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.tsx Outdated Show resolved Hide resolved
src/components/Popups/PopupHighlight.tsx Show resolved Hide resolved
src/components/Popups/PopupHighlight.tsx Outdated Show resolved Hide resolved
src/highlight/HighlightAnnotations.tsx Outdated Show resolved Hide resolved
jstoffan
jstoffan previously approved these changes Aug 27, 2020
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. Please make sure to regression test the existing region functionality, especially given the changes to popup arrows and the BUIE upgrade.

src/components/Popups/PopupHighlight.scss Outdated Show resolved Hide resolved
@mergify mergify bot merged commit b92f8bb into box:master Aug 27, 2020
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.

3 participants