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

Migrate Box Plot visualization to React #3948

Merged
merged 7 commits into from
Jul 4, 2019

Conversation

kravets-levko
Copy link
Collaborator

@kravets-levko kravets-levko commented Jul 3, 2019

What type of PR is this? (check all applicable)

  • Refactor
  • Feature

Description

  • Convert component to React
  • Make visualization responsive (scale contents to fit container) + watch container resize
  • Tests

Related Tickets & Documents

#3301 (Migrate Visualizations to React -> Box Plot)

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Query page:

image

Dashboard:

image

@ranbena
Copy link
Contributor

ranbena commented Jul 3, 2019

Ok I gotta ask - if this visualization is marked as (deprecated), wouldn't this be the opportunity to actually drop it?

@kravets-levko
Copy link
Collaborator Author

I think someone may still use it, therefore we don't drop it. Anyway, it's already migrated (and it didn't took much time)...

@kravets-levko kravets-levko marked this pull request as ready for review July 3, 2019 13:41
@kravets-levko kravets-levko changed the title Migrate box Plot (Deprecated) visualization to React Migrate Box Plot visualization to React Jul 3, 2019
@kravets-levko
Copy link
Collaborator Author

kravets-levko commented Jul 3, 2019

@ranbena @gabrieldutra Updating viewport definitely helped:

image

So now few questions.

  1. Do we need other width except of 1280? (my opinion - yes)
  2. Should I change Cypress viewport (probably for all tests), and leave Percy defaults, or to tell Percy to use Cypress browser size (1000px in our case)? (my opinion - change Cypress to match Percy)
  3. Do not touch anything, but create a helper to take few Percy screenshots using different viewports (which will update cy.viewport, wait a little bit, take a screenshot of this size, - and will repeat it for all sizes).

WDYT?

@arikfr
Copy link
Member

arikfr commented Jul 3, 2019

I think someone may still use it, therefore we don't drop it. Anyway, it's already migrated (and it didn't took much time)...

It's actually almost unused. Considering you already did the work to migrate it, then let's keep it. But how about we update the list not to show deprecated types in the list when creating a new visualization but render it if it exists?

@kravets-levko
Copy link
Collaborator Author

@arikfr It's good idea, but I'll do it in another PR

@gabrieldutra
Copy link
Member

gabrieldutra commented Jul 3, 2019

Do we need other width except of 1280?

In this case I'd say only 1280px is enough.

For the default we should think if Mobile Percy diff is that useful in most cases as it doubles the number of screenshots taken on each build. Imo we could leave only the 1280px as a default and trigger mobile ones only for specific pages.

Should I change Cypress viewport (probably for all tests), and leave Percy defaults, or to tell Percy to use Cypress browser size (1000px in our case)?

I prefer 1280px too.

Do not touch anything, but create a helper to take few Percy screenshots using different viewports

🤔 I would do it in case there are Snapshots that require more than only the 1280px with the same issue. With only the that resolution, the global cypress option should do fine.

@arikfr
Copy link
Member

arikfr commented Jul 3, 2019

It's good idea, but I'll do it in another PR

Definitely.

@kravets-levko
Copy link
Collaborator Author

It had to be pretty small and quick refactor/React migration PR of a not-so-important component, but we have what we have 😅

image

@kravets-levko kravets-levko force-pushed the migrate-visualization-box-plot branch from d18517d to 71be50c Compare July 3, 2019 19:14
@kravets-levko
Copy link
Collaborator Author

Okay, I thinks it's ready for review and (if everyone is happy with code) to merge.

Copy link
Contributor

@ranbena ranbena left a comment

Choose a reason for hiding this comment

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

We're stronger now 💪🏋️‍♀️

@kravets-levko kravets-levko merged commit 1f4325b into master Jul 4, 2019
@kravets-levko kravets-levko deleted the migrate-visualization-box-plot branch July 4, 2019 19:25
@kravets-levko kravets-levko added the Frontend: React Frontend codebase migration to React label Jul 8, 2019
harveyrendell pushed a commit to pushpay/redash that referenced this pull request Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend: React Frontend codebase migration to React Frontend Visualizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants