Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ permissions:

jobs:
preview:
uses: LightconeResearch/astra-ui/.github/workflows/preview.yml@9c940ebd65c0d25c46f9dbc83c27c8635aa3eda2
uses: LightconeResearch/astra-ui/.github/workflows/preview.yml@6248ae0bf1ca7b4ee45de52f0b9839c0e0d1d4e6
with:
ui: 9c940ebd65c0d25c46f9dbc83c27c8635aa3eda2
ui: 6248ae0bf1ca7b4ee45de52f0b9839c0e0d1d4e6
theme: ${{ github.event.pull_request.head.sha }}
secrets:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
Expand Down
25 changes: 20 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/astra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"dependencies": {
"@astra-spec/sdk": "^0.1.2",
"@astra-spec/ui": "0.0.5",
"@astra-spec/ui": "0.0.6",
"@lightcone-research/brand": "0.0.3",
"@myst-theme/providers": "^1.3.1",
"myst-common": "^1.8.1",
Expand Down
3 changes: 3 additions & 0 deletions packages/astra/src/inventory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export function AstraInventory({
document={publication.document}
index={publication.index}
analysisPath={publication.activeAnalysis.canonicalPath}
// The page already fixes which analysis is read; sub-analyses are
// reached through their own pages, not by switching the inventory.
showHierarchy={false}
idPrefix="astra-inventory-"
/>
</DetailDialog>
Expand Down
6 changes: 4 additions & 2 deletions packages/astra/styles/astra.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@

/* Citation previews use the shared floating tree so pointer travel remains
coordinated with their parent record card. Their inner document keeps the
stock MyST bibliography appearance; this only makes the shared shell inert. */
stock MyST bibliography appearance; this only makes the shared shell inert.
The card portals beside its parent preview rather than inside it, so it
must stack above the shared preview level to be seen at all. */
.astra-ui.astra-preview-popover-portal.astra-citation-preview-portal
.astra-citation-preview {
z-index: 70;
z-index: calc(var(--astra-z-preview, 1100) + 1);
width: 500px;
max-width: calc(100vw - 1rem);
color: inherit;
Expand Down
2 changes: 2 additions & 0 deletions packages/astra/tests/inventory.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ describe('publication inventory', () => {
const inventory = await screen.findByRole('dialog', { name: 'Demo' });
expect(inventory.closest('article')).toBeNull();
expect(within(inventory).getByRole('heading', { name: 'Outputs' })).toBeVisible();
expect(within(inventory).queryByRole('navigation', { name: 'Project hierarchy' })).toBeNull();
expect(within(inventory).queryByRole('button', { name: 'Calibration' })).toBeNull();
expect(within(inventory).getByRole('img', { name: 'Shear correlation plot' })).toHaveAttribute(
'src', '/myst-assets/shear_plot.png',
);
Expand Down
8 changes: 8 additions & 0 deletions packages/astra/tests/styles-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ describe('shared ASTRA stylesheet contract', () => {
expect(orphans).toEqual([]);
});

it('stacks a nested citation card above the shared preview it opens from', () => {
// Both cards portal beside each other, so the citation must outrank the
// shared preview level rather than a fixed number below it.
expect(css).toMatch(
/\.astra-citation-preview-portal\s+\.astra-citation-preview \{[^}]*z-index: calc\(var\(--astra-z-preview(?:, ?\d+)?\) \+ 1\);/,
);
});

it('keeps registry identifiers visually identical when no anchor is available', () => {
expect(css).toMatch(
/\.astra-inputs \.astra-id,\s*\.astra-outputs \.astra-id \{[^}]*font-weight: 500;[^}]*text-decoration: underline;/,
Expand Down