Skip to content

Commit

Permalink
Formatted different types of name in text, to convey meaning better.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Aug 7, 2024
1 parent ceface8 commit ee8d1a7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
We'll note all notable changes in this file, including bug fixes, enhancements, and all closed issues.
Dates are in `YYYY-MM-DD` format and versions are in [semantic versioning](http://semver.org/) format.

## 0.10.9 2024-08-10

### Added

- Formatted different types of references

## 0.10.8 2024-08-03

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Noto+Emoji&family=Noto+Color+Emoji&family=Noto+Sans+Mono&family=Noto+Sans:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap"
href="https://fonts.googleapis.com/css2?family=Noto+Emoji&family=Noto+Color+Emoji&family=Noto+Sans+Mono@0,400;1,400;0,700&family=Noto+Sans:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap"
/>
<link
href="https://fonts.googleapis.com/css2?family=Noto+Emoji&family=Noto+Color+Emoji&family=Noto+Sans+Mono&family=Noto+Sans:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap"
href="https://fonts.googleapis.com/css2?family=Noto+Emoji&family=Noto+Color+Emoji&family=Noto+Sans+Mono@0,400;1,400;0,700&family=Noto+Sans:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap"
rel="stylesheet"
/>

Expand Down
6 changes: 3 additions & 3 deletions src/components/editor/InputView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
export let node: Input;
</script>

<NodeView node={node.name} /><NodeView node={node.bind} /><NodeView
node={node.value}
/>
<small><NodeView node={node.name} /></small><NodeView
node={node.bind}
/><NodeView node={node.value} />
45 changes: 29 additions & 16 deletions src/components/editor/ReferenceView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,27 @@
import type StreamValue from '@values/StreamValue';
import type Value from '../../values/Value';
import { animationFactor } from '../../db/Database';
import Source from '@nodes/Source';
export let node: Reference;
let evaluation = getEvaluation();
$: project = $evaluation?.evaluator.project;
$: root = project?.getRoot(node);
$: context =
root?.root instanceof Source
? project?.getContext(root.root)
: undefined;
$: definition = node.resolve(context);
let stream: StreamValue<Value, unknown> | undefined;
$: {
if ($evaluation) {
const parent = $evaluation.evaluator.project
.getRoot(node)
?.getParent(node);
stream =
parent instanceof Evaluate
? $evaluation.evaluator.getStreamFor(parent)
: undefined;
}
$: if ($evaluation) {
const parent = root?.getParent(node);
stream =
parent instanceof Evaluate
? $evaluation.evaluator.getStreamFor(parent)
: undefined;
}
// If this evaluated to the stream that recently changed, style it.
Expand All @@ -49,13 +54,12 @@
}
</script>

{#if animating}
<span class="changed">
<NodeView node={node.name} />
</span>
{:else}
<span
class:changed={animating}
class={definition ? definition.getDescriptor() : ''}
>
<NodeView node={node.name} />
{/if}
</span>

<style>
.changed {
Expand All @@ -81,4 +85,13 @@
transform: scale(1);
}
}
.StructureDefinition,
.StreamDefinition {
font-style: italic;
}
.StreamDefinition {
text-shadow: 3px 3px 2px var(--wordplay-chrome);
}
</style>

0 comments on commit ee8d1a7

Please sign in to comment.