Skip to content

Conversation

tarinagarwal
Copy link

  • Fixed file exports to include correct theme data
  • Updated PNG and JPG exports to maintain currently selected theme
  • Fixed theme reverting to default on page reload
  • Ensures theme state persists across browser sessions and exports
2025-08-26.18-06-10.mp4

fix all file exports to have correct theme data
fix png and jpg exports to persist current selected theme
};
setValue(newValue);

// Only save children and viewport to localforage, not theme
Copy link
Contributor

@pubuzhixing8 pubuzhixing8 Aug 26, 2025

Choose a reason for hiding this comment

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

I am curious that why not save theme to localforage and save it to localStorage.

I think is fine that save viewport, children, and theme to one place.

};

// Fallback theme background colors mapping
const getThemeBackgroundColorFallback = (
Copy link
Contributor

Choose a reason for hiding this comment

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

You can get the active themeColors data through PlaitBoard.getThemeColors(board);.

You can encapsulate e method exactly to get the background color of the drawing board in this way.

children: data.children,
viewport: data.viewport,
theme: { themeColorMode: savedTheme || ThemeColorMode.default },
});
return;
}
const localData = localStorage.getItem(OLD_DRAWNIX_LOCAL_DATA_KEY);
if (localData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to remove the feedback logic later, so you can ignore it.

}}
afterInit={(board) => {
console.log('board initialized');

// Ensure the saved theme is applied after board initialization
Copy link
Contributor

Choose a reason for hiding this comment

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

If the theme could be initialized correctly, whether the logic maybe is unnecessary.

@pubuzhixing8
Copy link
Contributor

pubuzhixing8 commented Aug 27, 2025

Hi @tarinagarwal ! I had reviewed this pr and there were some suggestions.

You can resolve them in your free time.

Btw, there is a conflict in app.tsx.

@tarinagarwal
Copy link
Author

Hey! @pubuzhixing8
Yeah, I am working on that, will create the PR ASAP

@pubuzhixing8
Copy link
Contributor

@tarinagarwal Have you pushed it, I don't see any new commits.

@tarinagarwal
Copy link
Author

@pubuzhixing8 no i havent, ill push it today

@pubuzhixing8
Copy link
Contributor

Hi @tarinagarwal, we set up a contributors group on Discord and are looking forward to your joining https://discord.gg/Dw55dMr8.

@tarinagarwal
Copy link
Author

@pubuzhixing8 Ya sure I will join it now!
And sorry for not being able to create the PR, I am shifting to a new flat, I will do it ASAP

@pubuzhixing8
Copy link
Contributor

@pubuzhixing8 Ya sure I will join it now! And sorry for not being able to create the PR, I am shifting to a new flat, I will do it ASAP

Congrats on the new flat! Don't even worry about the PR right now—you can tackle that after you've settled in.

@tarinagarwal
Copy link
Author

@pubuzhixing8 Thank you!

@pubuzhixing8 pubuzhixing8 mentioned this pull request Aug 31, 2025
2 tasks
@tarinagarwal
Copy link
Author

tarinagarwal commented Sep 13, 2025

@pubuzhixing8 Hey! Sorry for not being active.. I am done with all my shifting stuff. I will get done with all these fixes by tmrw!

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.

2 participants