Skip to content

feat(highlight): Render promoter tooltip#557

Merged
mergify[bot] merged 1 commit intobox:masterfrom
mingzexiao6:add-promoter
Aug 27, 2020
Merged

feat(highlight): Render promoter tooltip#557
mergify[bot] merged 1 commit intobox:masterfrom
mingzexiao6:add-promoter

Conversation

@mingzexiao6
Copy link
Contributor

No description provided.

@@ -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.

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.

@mingzexiao6 mingzexiao6 force-pushed the add-promoter branch 2 times, most recently from 874cd84 to adbe203 Compare August 26, 2020 18:05
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.

@mingzexiao6 mingzexiao6 marked this pull request as ready for review August 27, 2020 05:42
@mingzexiao6 mingzexiao6 requested a review from a team as a code owner August 27, 2020 05:42
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.

@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