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

Code improvements meta issue #1303

Open
19 tasks
monfera opened this issue Aug 16, 2021 · 0 comments
Open
19 tasks

Code improvements meta issue #1303

monfera opened this issue Aug 16, 2021 · 0 comments

Comments

@monfera
Copy link
Contributor

monfera commented Aug 16, 2021

  • Check for zero dimension canvas mentioned at the bottom of this as otherwise the current code (pre or post merge) may throw
  • Reconsider the array enums and object enums as the time for switching to proper TS enums may have come, and/or it's sometimes possible, and better, to piggyback on a preexisting HTML DOM type library instead of explicitly listing values (though the latter would help generate configuration UIs automatically, cf. Config object in partition charts)
  • (maybe for a separate, functional meta issue?) More pattern filling options, eg. round number of tiling, or constrained, approximate tile sizes (in pixels) as well as scaling options upon resize (initial discussion) and original issue
  • (maybe for a separate, functional meta issue?) Introduce an API option for font weight (refactor(cartesian): timeslip preparation #1286 (comment))
  • Consider renamingON_TOGGLE_DESELECT_SERIES (comment)
  • Consider moving away from the use of specId in heatmap to encode information (came up eg. here)
  • Move into theme or EUI some magic constants eg. font property details or this
  • switch to a more uniform way for generating CSS font shorthand, also considering defaults; ambiguities; possibly missing values; avoidance of unnecessary object creation—one preexisting place to solve is in the text measurement
  • check for === true, === false, return true etc. redundancy candidates and eliminate
  • create PR review cheat sheet for things like justification forlet, unsafe application of destructive operators (sort, reverse, splice etc.), simplicity of code, economy with control structures, and reduction of code noise eg. too many arg passings up and down, with too many args
  • introduce comprehensive type safety to Charts (eg. xy had large gaps - see test(xy): scale type improvements #1381 - and likely most non-cartesian chart types too)
  • move external code outside src and preferably charts, into a non-node dependency package (example)
  • replace all coercive equality op ==
  • when a condition inside a loop is invariant of the loop (example: computeXDomainLineAnnotationDimensions as of 17 Sept 2021) and that's most of what's happening in the loop, then the condition should be hoisted outside the loop, and two or more different loops should be created, depending on the predicate
  • shovel out non-node_modules deps Revise 3rd party licensed code #1385
  • use Number.isFinite as a type guard in lots of places where we check numberness, now with or without finiteness or NaN check, once this TS issue is solved for Number.isFinite
  • Introduce a default mode for the StackMode enum to replace the undefined mode used to describe the same
  • Remove nullability of DataSeriesDatum defaulting to NaN where appropriate
  • Remove all anys from Heatmap viewmodel.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant