-
Notifications
You must be signed in to change notification settings - Fork 25
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
More docs automation #2923
More docs automation #2923
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
|
Apply Sweep Rules to your PR?
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2923 +/- ##
==========================================
+ Coverage 69.78% 69.84% +0.05%
==========================================
Files 119 120 +1
Lines 6762 6765 +3
Branches 1443 1444 +1
==========================================
+ Hits 4719 4725 +6
+ Misses 2035 2032 -3
Partials 8 8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Margin issue in docs is pretty bad, and the multiplier for charts is confusing (but I think it's not new?).
@@ -16,6 +16,7 @@ export type CodeEditorProps = { | |||
lineWrapping?: boolean; | |||
errors?: SqError[]; | |||
sourceId?: string; | |||
fontSize?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think size?: "normal" | "small"
, like we use in other components, would be better (editor size is not just about its font size, and I'm not even sure that modifying font size on top level makes sense), but nbd for now.
packages/components/src/stories/SquiggleChart/DistributionSizes.stories.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is getting too complicated for me to review properly, and I trust that you checked it manually for corner cases.
One comment, though: ideally, height
passed from the outside should be the height of the main frame, right?
But it can be a bit hard to do because useCanvas
needs fixed height to initialize context, and drawAxes
can increase the suggested padding (I don't think that happens often with the vertital padding, though).
So one idea for future improvements is to precalculate the height, based on inner height + necessary vertical padding for samples+title+axes in advance, maybe with the invisible canvas if we need to measure text size, and then use that in useCanvas
call.
const showAxisTitles = height > 30; | ||
const shownXAxisTitle = showAxisTitles && !!plot.xScale.title; | ||
const showXAxis = height > 15; | ||
const nonTitleHeight = Math.max(height - (showXAxis ? 20 : 0), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line looks sketchy to me, not sure where 20
is coming from, probably the dependency on the internals of InnerDistributionsChart
?
* main: fix result chart height Fixed RV Plot
This does a few small things:
interactiveExamples
, which are likeexamples
, but they get shown in theSquiggleEditor
.SquiggleEditor
to make it nicer to work in the documentation.BuiltIn
Documentation toCommon
, and pulls out some parts of it intoString
and the newBoolean
namespace. (Note: We might want this to be calledBool
instead)generateModulePages
now also generates the_meta.json
page, which means that all of/Api/
is now generated.