Folo icon indicating copy to clipboard operation
Folo copied to clipboard

feat: view source content in app

Open lawvs opened this issue 1 year ago • 6 comments

Fix https://github.com/RSSNext/Follow/issues/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

https://github.com/user-attachments/assets/76a9f0fe-dded-40fb-a3d3-07d28858181b

Modal in social and video

https://github.com/user-attachments/assets/ec97794e-0076-4639-83f2-8829d5646294

Screenshot 2024-09-28 at 15 40 51

In image view

https://github.com/user-attachments/assets/c0ed592a-3f6c-4576-bf2c-a24f3a98542d


~~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?~~

lawvs avatar Sep 26 '24 17:09 lawvs

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

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 26 '24 17:09 vercel[bot]

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.

DIYgod avatar Sep 26 '24 18:09 DIYgod

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

vercel[bot] avatar Sep 28 '24 10:09 vercel[bot]

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.

Innei avatar Sep 28 '24 10:09 Innei

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.

Innei avatar Sep 28 '24 10:09 Innei

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.

https://github.com/user-attachments/assets/48f1f318-607c-4fab-bb04-0be6e06f5695

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 avatar Sep 28 '24 18:09 lawvs

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.

lawvs avatar Sep 29 '24 06:09 lawvs

Nice work!

Innei avatar Sep 29 '24 08:09 Innei