feat: view source content in app
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
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
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 is attempting to deploy a commit to the RSS3 Team on Vercel.
A member of the Team first needs to authorize it.
Excellent work!
-
I think the current implementation is better than modal, it gives me less pressure.
-
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.
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 |
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.
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.
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?
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.
Nice work!