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

feat: view source content in app #655

Merged
merged 13 commits into from
Sep 29, 2024
Merged

Conversation

lawvs
Copy link
Contributor

@lawvs lawvs commented Sep 26, 2024

Fix #247

This pull request introduces a new feature that allows users to view the source content in the follow app.


Warn banner for web

Screenshot 2024-09-28 at 15 37 44

Loading and transition

Screen.Recording.2024-09-28.at.15.38.24.mov

Modal in social and video

Screen.Recording.2024-09-28.at.15.40.18.mov
Screenshot 2024-09-28 at 15 40 51

In image view

Screen.Recording.2024-09-28.at.15.44.23.mov

Note: This is just a prototype PR designed to demonstrate the practicality and feasibility of this feature.

Before proceeding with further enhancements, I need some guidance on the following points:

1. Viewing the source in a modal is also a viable option. Should we adjust to view the source in a modal?
2. Currently, the feature is triggered by right-clicking the "Open in browser" btn. This is not an ideal solution, but I think the toolbar in the top-right corner is already crowded. Where do you think would be a better place for this button?

Copy link

vercel bot commented Sep 26, 2024

@lawvs is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

@lawvs lawvs force-pushed the feat/source-view-poc branch from 71df955 to b6f80a2 Compare September 26, 2024 17:56
@DIYgod
Copy link
Member

DIYgod commented Sep 26, 2024

Excellent work!

  1. I think the current implementation is better than modal, it gives me less pressure.

  2. I think we can use the normal click event of "Open in browser", which means replacing the new window opening, after all, we already have another two open in new window: double-clicking the entry and clicking the entry title. And it would be better if we could set whether to view the source or open a new window in the settings, but by default, it should still view the source.

@lawvs lawvs force-pushed the feat/source-view-poc branch 3 times, most recently from 0129bd9 to badee90 Compare September 28, 2024 07:18
@lawvs lawvs changed the title feat: open entry in app poc feat: view source content in app Sep 28, 2024
@lawvs lawvs marked this pull request as ready for review September 28, 2024 07:50
style={stableRenderStyle}
className="duration-200 ease-in-out animate-in fade-in slide-in-from-bottom-24 f-motion-reduce:fade-in-0 f-motion-reduce:slide-in-from-bottom-0"
key={entry.entries.id}
<div className="relative flex size-full flex-col overflow-hidden">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just wrap a new div here, try enabling "hide whitespace" to see the changes.

@lawvs lawvs force-pushed the feat/source-view-poc branch from 841054d to 1430941 Compare September 28, 2024 09:26
Copy link

vercel bot commented Sep 28, 2024

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

Name Status Preview Comments Updated (UTC)
follow ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 29, 2024 3:48am

@Innei
Copy link
Member

Innei commented Sep 28, 2024

That's great.

But have you considered adding a shortcut to this feature?

By the way, for the sake of UI consistency, we should use the Solid icon when the button is selected.

Signed-off-by: Innei <i@innei.in>
@Innei
Copy link
Member

Innei commented Sep 28, 2024

And I've noticed a significant frame drop during the animation transition with the ViewSource open. Is there a way to optimize this.

Perhaps content rendering should be avoided during the transition, and only displayed after it is completed.

@lawvs
Copy link
Contributor Author

lawvs commented Sep 28, 2024

And I've noticed a significant frame drop during the animation transition with the ViewSource open. Is there a way to optimize this.

I have optimized the transition when viewing the source code, and the frame drop issue has been somewhat alleviated.

Screen.Recording.2024-09-29.at.02.21.32.mov

But have you considered adding a shortcut to this feature?

Regarding the shortcut key, I think we can use cmd+b or ctrl+b (win). What do you think?

@lawvs
Copy link
Contributor Author

lawvs commented Sep 29, 2024

But have you considered adding a shortcut to this feature?

Regarding the shortcut key, I think we can use cmd+b or ctrl+b (win). What do you think?

After checking, I found that the shortcut cmd+B conflicts with the toggle feed sidebar, so it is not feasible. Additionally, assigning shortcuts without careful consideration of their functions is not a good practice. Perhaps we can consider it later.

@Innei
Copy link
Member

Innei commented Sep 29, 2024

Nice work!

@Innei Innei merged commit 8ba5822 into RSSNext:dev Sep 29, 2024
5 checks passed
@lawvs lawvs deleted the feat/source-view-poc branch September 29, 2024 09:28
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.

[Feature Request] Open entry in the follow app
3 participants