Skip to content

Commit c7497cb

Browse files
authored
fix(templates): the canvas artboard and the milestone timeline keep left-to-right in right-to-left pages (#12113)
[fix] In right-to-left pages, the canvas editor's artboard no longer goes blank and the progress dashboard's milestone timeline no longer draws its labels over the bars: both keep a left-to-right layout, as a design canvas and a chart should (the same page's scope burndown too). Left-to-right pages look the same.
1 parent 9a47fff commit c7497cb

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎.changeset/rtl-physical-regions.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/cli': patch
3+
---
4+
5+
[fix] In right-to-left pages, the canvas editor's artboard no longer goes blank and the progress dashboard's milestone timeline no longer draws its labels over the bars: both keep a left-to-right layout, as a design canvas and a chart should (the same page's scope burndown too). Left-to-right pages look the same.
6+
7+
@josephfarina

‎packages/cli/assets/templates/pages/canvas-editor/page.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,11 @@ export default function CanvasEditor() {
21552155
height="max-content"
21562156
minHeight="100%"
21572157
xstyle={styles.canvasStage}>
2158+
{/* The artboard is a physical coordinate space:
2159+
layers sit at x/y from its top-left corner in
2160+
every reading direction. */}
21582161
<Card
2162+
dir="ltr"
21592163
padding={0}
21602164
elevation="med"
21612165
width={FRAME.width * scale}

‎packages/cli/assets/templates/pages/dashboard-progress/page.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,9 @@ function GanttChart({milestones}: {milestones: Milestone[]}) {
675675

676676
return (
677677
<VStack gap={3}>
678-
<ResponsiveContainer width="100%" height={height}>
678+
{/* A chart keeps its axes in every reading direction: time runs left to
679+
right and the row labels stay beside their bars. */}
680+
<ResponsiveContainer width="100%" height={height} dir="ltr">
679681
<BarChart
680682
data={data}
681683
layout="vertical"
@@ -862,7 +864,8 @@ const BURNDOWN_HEIGHT = DONUT_SIZE;
862864
function BurndownChart() {
863865
return (
864866
<VStack gap={3}>
865-
<ResponsiveContainer width="100%" height={BURNDOWN_HEIGHT}>
867+
{/* Left to right in every reading direction, like every chart. */}
868+
<ResponsiveContainer width="100%" height={BURNDOWN_HEIGHT} dir="ltr">
866869
<LineChart
867870
data={BURNDOWN}
868871
margin={{top: 16, right: 4, left: 4, bottom: 4}}>

0 commit comments

Comments
 (0)