Skip to content

Update Night Sky Panel's Markings tab + Small Sun Tab refactor#207

Draft
WeirdRubberDuck wants to merge 14 commits intomasterfrom
issue/3753-nightsky-markings-layout
Draft

Update Night Sky Panel's Markings tab + Small Sun Tab refactor#207
WeirdRubberDuck wants to merge 14 commits intomasterfrom
issue/3753-nightsky-markings-layout

Conversation

@WeirdRubberDuck
Copy link
Copy Markdown
Collaborator

@WeirdRubberDuck WeirdRubberDuck commented Mar 20, 2026

Closes OpenSpace/OpenSpace#3753 by adding a new ToggleCard component and improving the layout in the Night Sky Panel's Markings tab. IN discussion with @ylvaselling, I also changed the design for the Cardinal directions part to better reflect how this control works, and that it's different from the other toggles.

Drafting as the following needs to be fixed before merging:

New VS old Markings tab:
image

New VS old Sun tab:
image

@WeirdRubberDuck WeirdRubberDuck marked this pull request as draft March 20, 2026 08:40
@WeirdRubberDuck
Copy link
Copy Markdown
Collaborator Author

WeirdRubberDuck commented Mar 20, 2026

The layout is now more responsive and uses an adaptive gridding similar to the skybrowser panel. Demonstration:

2026-03-20.09-43-50.mov

@@ -0,0 +1,5 @@
.card {
&:active {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for myself, what does the & do here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It controls how the CSS rules are nested. With the &, this rule is parsed to:

.card:active

versus, without it, it would add a whitespace in between the two selectors and be interpreted as the rule being applied to all "descendants" of the .card selector, rather than the card itself. Just using :active without the & essentially parses to

.card *:active

This page summarizes it quite nicely
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/Nesting_selector

However, since this is the only rule under the .card selector, I'll replace it with .card:active. The nesting is no longer needed as no other styling is applied to the card (I was experimenting a bit with borders) :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

WeirdRubberDuck and others added 2 commits March 27, 2026 09:13
Co-authored-by: Alexander Bock <mail@alexanderbock.eu>
# Conflicts:
#	src/panels/NightSkyPanel/tabs/MarkingsTab/SceneGraphNodeToggle.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NightSky Panel: Layout issues

2 participants