Skip to content

Commit 9d9c3f3

Browse files
committed
docs(cleanup): adding clarifying comments
Signed-off-by: Dhruv Arora <dhruv.arora1@autodesk.com>
1 parent f6f8b0b commit 9d9c3f3

4 files changed

Lines changed: 13 additions & 1 deletion

File tree

fission/src/mirabuf/MirabufThumbnail.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import {
1111
import World from "@/systems/World"
1212
import { unzipMira } from "@/util/Utility"
1313

14+
/**
15+
* wire tag protobuf has for thumbnails
16+
* derived so renumbering the schema can't desync from the generated code
17+
*/
1418
const ASSEMBLY_THUMBNAIL_TAG = Reader.create(
1519
mirabuf.Assembly.encode(new mirabuf.Assembly({ thumbnail: new mirabuf.Thumbnail() })).finish()
1620
).uint32()

fission/src/ui/panels/configuring/initial-config/InitialConfigPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const InitialConfigPanel: React.FC<PanelImplProps<void, void>> = ({ panel }) =>
3333

3434
useHoldPhysicsPause()
3535

36-
// bug: pressing 'enter' will open the library modal. Instead, we focus on this panel
36+
// The Add Assembly button keeps DOM focus after spawning, so Enter would reopen the Library.
3737
useEffect(() => {
3838
if (document.activeElement instanceof HTMLElement) document.activeElement.blur()
3939
}, [])

fission/src/ui/tour/TourOverlay.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const SCRIM_COLOR = "rgba(0,0,0,0.5)"
1515
// Gap from the top bar / viewport edge for an anchorless card that is pinned to a corner.
1616
const SCREEN_EDGE_GAP = 12
1717
const SPOTLIGHT_PAD = 6
18+
19+
// after step changes we remeasure points. Anchors can move without resizing because of MUI stuff / panels
1820
const SETTLE_DELAYS = [0, 100, 250, 450]
1921

2022
/** Fixed-position style for an anchorless card, keyed by its {@link ScreenPosition}. */

fission/src/ui/tour/tourConditions.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export interface TourResult {
7474
toast?: string
7575
}
7676

77+
/** The nearest preceding step whose `advanceOn` establishes this condition. */
7778
function producerOf(condition: TourCondition, before: number): number | undefined {
7879
for (let i = before - 1; i >= 0; i--) {
7980
const advanceOn = TOUR_STEPS[i].advanceOn
@@ -87,6 +88,11 @@ function countFor(stepIndex: number, snapshot: TourSnapshot): number | undefined
8788
return condition ? CONDITIONS[condition].count?.(snapshot) : undefined
8889
}
8990

91+
/**
92+
* given the current step and the progress of the simulator, returns what step the user should be on.
93+
*
94+
* Used for rewinding in the event of a user being outside the tour and advancing when step condition met
95+
*/
9096
export function reconcile(stepIndex: number, snapshot: TourSnapshot, previous: TourRuntime): TourResult {
9197
const step = TOUR_STEPS[stepIndex]
9298

0 commit comments

Comments
 (0)