Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass theme option as url params #1097

Merged
merged 7 commits into from
Oct 26, 2024

Conversation

DeepaPrasanna
Copy link
Contributor

fixes #791

Summary of changes: passed mode as the url param in the notion link and update the darkMode value in Notion doc

Screenshot 2024-10-17 190309
Screenshot 2024-10-17 190250

@DeepaPrasanna DeepaPrasanna requested a review from mfts as a code owner October 17, 2024 13:51
Copy link

vercel bot commented Oct 17, 2024

@DeepaPrasanna is attempting to deploy a commit to the mftsio Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added 🕹️ 150 points hacktoberfest revisit Currently not required but important in the future 🕹️ oss.gg labels Oct 17, 2024
@abhay-joshi007
Copy link

/assign

Copy link

oss-gg bot commented Oct 19, 2024

The /assign command can only be used on issues, not on pull requests.

Copy link
Owner

@mfts mfts left a comment

Choose a reason for hiding this comment

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

@DeepaPrasanna I think we have a misunderstanding.

The sender should add the ?theme=dark|light to the Notion URL when they are uploading it to Papermark.
From there we are extracting it and passing it into the NotionPage component.

The actual Papermark link does not change

@mfts
Copy link
Owner

mfts commented Oct 22, 2024

@DeepaPrasanna please have a look at my last comment

@DeepaPrasanna
Copy link
Contributor Author

I am really sorry for the delay. I will update within few hours.

@mfts
Copy link
Owner

mfts commented Oct 22, 2024

I am really sorry for the delay. I will update within few hours.

No rush. I know you are also busy with other things. But great to keep this PR moving along.

@DeepaPrasanna
Copy link
Contributor Author

DeepaPrasanna commented Oct 23, 2024

I am really sorry for the delay. I will update within few hours.

No rush. I know you are also busy with other things. But great to keep this PR moving along.

@mfts Thank you for your patience :) I have taken into account your reviews and updated the code.

Pls also refer to the screen recording showing the changes.

Also, I think this may require updating docs so that users may know to send the query params for dark mode while uploading.
https://www.loom.com/share/74ed5f801a8f476fa182eb0468ff1557?sid=3de9bb42-8b69-4fa0-940e-f1ae5dd9f6a4

@DeepaPrasanna
Copy link
Contributor Author

Hello @mfts wdyt about this?

Copy link
Owner

@mfts mfts left a comment

Choose a reason for hiding this comment

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

Great job! Looks amazing and exactly how I imagined it.

I made minor adjustments, such as adding it to notionData instead of document and also adding it to custom domain routes

Copy link

vercel bot commented Oct 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
papermark ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 26, 2024 10:37am

@mfts
Copy link
Owner

mfts commented Oct 26, 2024

@DeepaPrasanna
Another cool idea would be to just make a button on the Notion document, that toggles dark/light mode and when toggled it changes the Notion url by appending / removing the ?mode=dark url query param.

Perhaps a task for a new PR before ossgg ends?

@DeepaPrasanna
Copy link
Contributor Author

DeepaPrasanna commented Oct 26, 2024

@DeepaPrasanna Another cool idea would be to just make a button on the Notion document, that toggles dark/light mode and when toggled it changes the Notion url by appending / removing the ?mode=dark url query param.

Perhaps a task for a new PR before ossgg ends?

It seems a cool one! Am I correct in assuming that you are here referring to the document shown when hitting the papermark link? If yes, it gives the user handle theme too, which will be enhancing ux

@mfts mfts merged commit 89e2f5a into mfts:main Oct 26, 2024
3 checks passed
Copy link

oss-gg bot commented Oct 26, 2024

Awarding DeepaPrasanna: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/DeepaPrasanna

@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🕹️] Support dark mode in Notion page view
3 participants