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

Remove dots from chart when time range is Infinity #16720

Conversation

miguelnietoa
Copy link
Contributor

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

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Remove dots from chart when time range is Infinity.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

Please replace this line with instructions on how to test your changes, a note
on the devices and browsers this has been tested on, as well as any relevant
images for UI changes.

  1. Login
  2. Enter to /dashboard/analytics

image

UI accessibility concerns?

If your PR includes UI changes, please replace this line with details on how
accessibility is impacted and tested. For more info, check out the
Forem Accessibility Docs.

Added/updated tests?

  • Yes
  • No, and this is why: no needed.
  • I need help with writing tests

[Forem core team only] How will this change be communicated?

Will this PR introduce a change that impacts Forem members or creators, the
development process, or any of our internal teams? If so, please note how you
will share this change with the people who need to know about it.

  • I've updated the Developer Docs or
    Storybook (for Crayons components)
  • This PR changes the Forem platform and our documentation needs to be
    updated. I have filled out the
    Changes Requested
    issue template so Community Success can help update the Admin Docs
    appropriately.
  • I've updated the README or added inline documentation
  • I've added an entry to
    CHANGELOG.md
  • I will share this change in a Changelog
    or in a forem.dev post
  • I will share this change internally with the appropriate teams
  • I'm not sure how best to communicate this change and need help
  • This change does not need to be communicated, and this is why not: please
    replace this line with details on why this change doesn't need to be
    shared

[optional] Are there any post deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

alt_text

@miguelnietoa miguelnietoa requested review from a team, nickytonline and Ridhwana and removed request for a team February 28, 2022 16:03
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Feb 28, 2022
@CLAassistant
Copy link

CLAassistant commented Feb 28, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

Thank you for opening this PR! We appreciate you!

For all pull requests coming from third-party forks we will need to
review the PR before we can process it through our CI pipelines.

A Forem Team member will review this contribution and get back to
you as soon as possible!

@miguelnietoa
Copy link
Contributor Author

Hi @jeremyf
What do you think about this solution?

Another possible solution is having something like Chart.defaults.elements.point.radius = 0; but Chart is just imported dynamically inside the drawChart function.

Copy link
Contributor

@jeremyf jeremyf left a comment

Choose a reason for hiding this comment

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

@miguelnietoa I like your second approach more (e.g. don't loop on "infinite").

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Mar 1, 2022
@jeremyf jeremyf requested a review from aitchiss March 1, 2022 16:20
Copy link
Contributor

@aitchiss aitchiss left a comment

Choose a reason for hiding this comment

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

This is working really well - thank you for making this improvement! I've just added a small suggestion - let me know what you think 🙂

app/javascript/analytics/dashboard.js Outdated Show resolved Hide resolved
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Mar 1, 2022
Copy link
Contributor

@aitchiss aitchiss left a comment

Choose a reason for hiding this comment

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

Looks great! Just a couple of very small change requests and then this will be good to go 🚀

app/javascript/analytics/dashboard.js Outdated Show resolved Hide resolved
app/javascript/analytics/dashboard.js Outdated Show resolved Hide resolved
@pr-triage pr-triage bot added PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes and removed PR: unreviewed bot applied label for PR's with no review labels Mar 2, 2022
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes labels Mar 2, 2022
@miguelnietoa
Copy link
Contributor Author

Requested changes are done! @aitchiss

Copy link
Contributor

@aitchiss aitchiss left a comment

Choose a reason for hiding this comment

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

Nice one! Thanks for making those changes 😄

Once the CI checks have all run we can get this merged - nice work 🔥

@pr-triage pr-triage bot removed the PR: unreviewed bot applied label for PR's with no review label Mar 2, 2022
@pr-triage pr-triage bot added the PR: partially-approved bot applied label for PR's where a single reviewer approves changes label Mar 2, 2022
@aitchiss
Copy link
Contributor

aitchiss commented Mar 2, 2022

The CI test failure is an unrelated flaky spec which we're already fixing up separately - for now I'm gonna re-run the build and hope for the best 😄

@miguelnietoa
Copy link
Contributor Author

The CI test failure is an unrelated flaky spec which we're already fixing up separately - for now I'm gonna re-run the build and hope for the best smile

It seems to have failed again, but no problem, let's wait until you guys manage to fix it! thanks

@aitchiss aitchiss merged commit 6cc341e into forem:main Mar 2, 2022
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Mar 2, 2022
@aitchiss
Copy link
Contributor

aitchiss commented Mar 2, 2022

All green now @miguelnietoa 🎉 Thanks again for this contribution!

@miguelnietoa
Copy link
Contributor Author

Nice! Thank you too 🎉

@miguelnietoa miguelnietoa deleted the miguelnietoa/remove-dots-when-infinity-time-range-15666 branch March 2, 2022 15:21
headline-design pushed a commit to headline-design/forem-1 that referenced this pull request Mar 11, 2022
* Remove dots from chart when time range is Infinity

* refactor: 🐛 Remove dots using the chart options

* refactor: ♻️ Improve params of drawChart func

* refactor: ♻️ Use a variable showPoints
dscottS3 pushed a commit that referenced this pull request Mar 18, 2022
* Remove dots from chart when time range is Infinity

* refactor: 🐛 Remove dots using the chart options

* refactor: ♻️ Improve params of drawChart func

* refactor: ♻️ Use a variable showPoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Analytics Infinity view lines are extra thick
4 participants