Skip to content

dark mode update#167

Draft
n-trevino wants to merge 20 commits intomasterfrom
166-make-gunnsdraw-shapes-compatible-with-drawio-dark-mode
Draft

dark mode update#167
n-trevino wants to merge 20 commits intomasterfrom
166-make-gunnsdraw-shapes-compatible-with-drawio-dark-mode

Conversation

@n-trevino
Copy link
Copy Markdown

@n-trevino n-trevino commented Jan 16, 2026

Updated GunnsDraw libraries shapes to be compatible with both draw.io dark mode and light mode. Updated netexport.py and supexport.py to update old gunns drawings shapes to the new shapes in the libraries.

closes #166
closes #154
closes #149

TO DO

  • make sure that custom colors aren't overwritten (e.g. sometimes people will color their ports or nodes and I don't want to overwrite that

@n-trevino n-trevino requested a review from joeval920 January 16, 2026 20:43
@n-trevino n-trevino self-assigned this Jan 16, 2026
@n-trevino n-trevino added the enhancement New feature or request label Jan 16, 2026
@n-trevino n-trevino marked this pull request as draft January 29, 2026 21:48
Comment thread draw/netexport.py
Comment thread draw/netexport.py
def updateShapeData(shape, master):
updated = False
if None == master:
return
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If None==master is a fatal mistake, should you report it for debug purposes? Otherwise it will fail silently later (because the None evaluates the same as False)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's not a fatal mistake - it should just means that, for that shape, the export script couldn't find its counterpart in the shape library, so the shape won't be updated to match its library counterpart. That update would purely aesthetic, so functionality isn't impacted. This could happen if a user is using a shape that's not in the GUNNS repo shape library (shape libraries outside of GUNNS do exist and are used), or if a user has a custom shape. I do think it would be more clear if it returned the updated flag though, which would be False at that point.

I was using updateLinkShapeData() and updateSpotterShapeData() as templates. However, do I think it could make sense to log/report when the master shape can't be found.

# checks, should be a little faster...
$(GUNNSDRAW_HEADERS) : %.hh : %.xml
@ echo $(shell $(PYTHON) $(GUNNS_HOME)/draw/netexport.py $<)
@ echo '$(shell $(PYTHON) $(GUNNS_HOME)/draw/netexport.py $<)'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don't the quotes just make it print $(GUNNS_HOME) instead of /Users/jvalerio/Sandbox/gunns_workspace/gunns?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hmm, I made that change so the CI would print properly - now that I'm printing out shape data updates, they often contain parenthesis (see here) which confuses the echo statement resulting in an error that isn't the export script's fault (see here). So, it works properly in the CI but I will try some local testing.

Comment thread draw/netexport.py Outdated
@joeval920
Copy link
Copy Markdown
Contributor

I decided to regenerate all the repo-tracked drawing XMLs using the new netexport script, to avoid possible confusion later. let me know if you think this was a bad idea for any reason.
f80d069

@n-trevino
Copy link
Copy Markdown
Author

I would like to note that Adsorber and MetabolicsV4 links used in TestOverflow40, TestOverflow41, and TestOverflow43 are currently housed in an external library in a different repository. I have updated that library for dark mode and will push it to that repo in the future.

@joeval920
Copy link
Copy Markdown
Contributor

I would like to note that Adsorber and MetabolicsV4 links used in TestOverflow40, TestOverflow41, and TestOverflow43 are currently housed in an external library in a different repository. I have updated that library for dark mode and will push it to that repo in the future.

Ok cool, thanks!

@joeval920
Copy link
Copy Markdown
Contributor

I made an update to the GunnsFluidAccum shape on master that I knew would cause merge conflicts with your branch. I think I have addressed them all and pushed an update to 166-make-gunnsdraw-shapes-compatible-with-drawio-dark-mode.
Let me know if you see any funny business!

@n-trevino
Copy link
Copy Markdown
Author

I made an update to the GunnsFluidAccum shape on master that I knew would cause merge conflicts with your branch. I think I have addressed them all and pushed an update to 166-make-gunnsdraw-shapes-compatible-with-drawio-dark-mode. Let me know if you see any funny business!

Just needed to revert the About fields, otherwise looks good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

2 participants