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

AG-6654 - Charts API Explorer Caching + Visual Improvements #5070

Merged
merged 6 commits into from
Apr 7, 2022

Conversation

alantreadway
Copy link
Member

@alantreadway alantreadway commented Apr 7, 2022

https://ag-grid.atlassian.net/browse/AG-6654

Primary changes:

  • During re-render we are reloading and rebuilding the entire JsonModel - this change seeks to remove this calculation from the re-render path by introducing caching. (1011e65)
  • Fixes small-screen rendering of the API Explorer - we no longer continue squishing things to the point of uselessness, but add scroll-bars to allow the content to be moved into view. (aaae9d3)
  • Makes the chart theme configurable interactively and adds JSDoc description for the field to improve self-documentation. (c81b4bd)

Bonus:

  • Improves marker shape typings. (28ab806)
  • Fixes an edge case in the rendering of primitive unions, where we previously assumed all elements were string literal types. (c0b19e9)

Theme option beforehand:
Screenshot 2022-04-07 at 12 17 45

Theme option after:
Screenshot 2022-04-07 at 12 17 53

@alantreadway alantreadway changed the title AG-6654 - Improve Charts API Explorer Caching AG-6654 - Charts API Explorer Caching + Visual Improvements Apr 7, 2022
@@ -28,6 +28,8 @@ export type AgChartThemeName =
| 'ag-vivid'
| 'ag-vivid-dark';

export type MarkerShape = 'circle' | 'cross' | 'diamond' | 'heart' | 'plus' | 'triangle' | any;
Copy link
Member

Choose a reason for hiding this comment

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

Is the any for the (new () => any) case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes - my original motivation was that a JSONSchema generator I was trying to use was failing on the previous new () => void - I don't think this is a significant degradation of the type information, given the generality of the previous definition?

Copy link
Member

Choose a reason for hiding this comment

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

agreed

@manapeirov
Copy link
Member

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants