xyphyn / photon Goto Github PK
View Code? Open in Web Editor NEWA replacement for lemmy-ui with more features, a better design, and more customizability.
Home Page: https://phtn.app
License: GNU Affero General Public License v3.0
A replacement for lemmy-ui with more features, a better design, and more customizability.
Home Page: https://phtn.app
License: GNU Affero General Public License v3.0
I see you have no LICENSE file for this project. The default is copyright.
I would suggest releasing the code under the AGPL-3.0-or-later license (like Lemmy) so that others are encouraged to contribute changes back to your project.
Describe the bug
As an instance administrator, I get moderation reports. However, when I click on the reported posts, I do not have the moderation actions such as to remove the post or ban the user.
To Reproduce (if applicable)
Steps to reproduce the behavior:
Expected behavior
Using the normal Lemmy-UI, I can remove posts or ban a user as an instance administrator.
Versions
It would be great if ARM based images are available.
if it helps, this is the workflow for mlmym for crossplatform builds
https://github.com/rystaf/mlmym/blob/main/.github/workflows/docker.yml
Using v0.4.22.
As is, the two sidebars (community listing on the left, and community info on the right) both appear to be static widths. I personally find the communities sidebar on the left to be too wide, pushing the main content off to the right side too much.
I'd easily be able to fix this myself if I could adjust the widths of each sidebar with a little slider, much like Slack or VS Code (to give two examples).
OS: Android 12
Browser: Firefox 116 and Brave 1.56.20
Reproducible steps
Expected behavior
The scroll only has effect on the menu, not in the behind timeline
It seems that the container is binding to 0.0.0.0 which means its exposed to the public ip address of the server.
Any way to send in a environment variable to make it bind to localhost only?
Hello, I'd love to throw this up as an alternative frontend option on https://lemdro.id, but I don't have the time right now to package it up myself. A Docker container or something like it could be easily deployed by me, thanks!
See below screenshots. I don't know if this is just because I am an admin or if this happens normally, I will test it with a normal account when I have time today. If this is simply because I am an admin, feel free to close this issue. Additionally, I figure I should tell you that I'll be deploying a custom tool soon to auto-update lemdro.id when you release new versions :)
Thanks again for your work!
Accessing photon through flatpak firefox on wayland.
Text editor hotkeys get sent to FF rather than the site-- for example, crtl + i
should italicize, crtl + k
should insert link markdown.
Since updating lemmy to 0.8.13, I am experiencing errors loading comments again.
For instance, using photon.xylight.dev
through the default lemm.ee
instance to access
https://photon.xylight.dev/post/lemm.ee/2185825
When clicking on 5 more
to expand the comments, I get a "Failure to fetch comments" toast. Looking at the networking output, it appears that the JSON is being delivered properly.
I augmented the current Photon to simply log a console message of the error and attempting to do the same thing, it appears that result of buildCommentTree(...).find(...)
is undefined
and that is why it is failing.
What is puzzling is that if I switch to an instance running 0.18.2
such as lemmy.world
, loading comments works fine.
I also tested this with lemdro.id
and was able to observe the same behavior:
What is puzzling is that if I switch to an instance still running 0.18.2
such as lemmy.world
(at the time of this issue), loading comments works fine.
On new Reddit, the vote buttons are in the top left corner. If the buttons were there for Photon as well, it would make the learning curve for Reddit users much smaller. When scrolling through new Reddit, I put my cursor where the arrow is and scroll down, keeping it in the same general area so I can quickly vote.
It would be awesome if we had a way of easily switching between Lemmy accounts. I, for instance, have my main admin account on lemmy.world, but I do not use that for general browsing, and it is kinda a hassle to log out and in just to switch to my alt-account. So something like this would be great!
If instance admins decide they want to only to use Photon instead of Lemmy-UI, an easy way to configure Photon to support sign-ups and not have users confuse with instance selection at login would be beneficial. (Perhaps Photon could access features not available through the regular API as well?)
Describe the solution you'd like
When I click on a image, open the image in the same page in it's full size rather than going to the post.
Additional context
For example, when you click on an image in mastodon.social it opens the image but doesn't go to the post.
For example, at least right now, the second post in https://photon.xylight.dev/c/[email protected]?sort=TopWeek has a spoiler in the description. In the feed, the spoiler is visible, while it is hidden in the post.
Is it possible to implement this feature?
Thank you
When trying to create a post, the community selection dropdown only shows a handful of communities.
Add markdown previews, maybe use editor.js
Hey, decided to host this at beta.lemmy.zip, but I'm seeing quite a few errors from people using it via a desktop (mobile browsing seems to be OK as far as I can tell).
The error that crashes the container is:
FetchError: invalid json response body at https://lemmy.zip/api/v3/post/list?limit=20&page=1&sort=Active&type_=Local reason: Unexpected token '<', "<html>
<h"... is not valid JSON
at /app/node_modules/node-fetch/lib/index.js:273:32
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'invalid-json'
}
/app/node_modules/node-fetch/lib/index.js:273
return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
^
FetchError: invalid json response body at https://lemmy.zip/api/v3/site? reason: Unexpected token '<', "<html>
<h"... is not valid JSON
at /app/node_modules/node-fetch/lib/index.js:273:32
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'invalid-json'
}
There are no other log files and I can't pinpoint exactly what causes the issue, but it appears to happen on page load after getting a "500" error.
Wonderful work!
I just wanted to report that capitalization seems to affect whether a particular warning appears.
Hi,
Opening photon.lemmy.wotld in Chrome on Android fails with error 500 and message:
Failed to fetch dynamically imported module: https://photon.lemmy.world/_app/immutable/nodes/12.73a723de.js
With regards,
Canary
No idea why this hasn't been reported yet, but I'd love to see a dark mode in Photon. I think its UI is beautiful, but I can't really consider using it daily without thinking "I wish this had a dark mode."
See next comment. The point still stands, however. I'd love to be able to use dark mode without having to explicitly tell the page that the system uses dark mode.
As is, Photon defaults to the Local
feed type with Active
sorting when navigating to the homepage.
Personally, I almost always use the Subscribed
feed type. It would be nice if I could set that as the default.
As a workaround, I've bookmarked the URL with my preferred feed parameters:
https://photon.xylight.dev/?type=Subscribed&sort=Active
However, these parameters get erased when clicking on the app logo, so it's not a full solution.
Rather than having to click "Next" to go to the next page, an automatically reloading infinite scrolling would be a more intuitive solution for a social feed.
PS: This is by far the best Lemmy front end! Thanks for your amazing work!
If you refresh Photon or open a Post in a new tab, the sidebar is always expanded even if it was previously collapsed.
It would be nice if the expanded state was saved, perhaps in local storage so that it is remembered upon refresh or if a post is opened in a new tab or window.
When clicking on nested comments that say "1 more" or "6 more", there is a spinner for loading, but the comments do not appear.
This can be reproduced here:
https://nu.lemdro.id/post/lemmy.world/2042527
On Firefox, the failure is silent. However, on Chrome, the failure triggers a red alert at the bottom that says the fetch failed.
In the Chrome, dev console, I see the following:
Following the stacktrace takes me to this:
The size of the post editing field seems fine for a few sentences, but when typing a longer post, it quickly becomes insufficient. Additionally, the resizing handle is quite low contrast and some users might not be able to see it.
Possible solutions:
Default size:
What seems like a more comfortable size for a larger post:
Adding a markdown toolbar will help very much with post and comment formatting.
When trying to create a post with an image upload, it fails due to CORS:
This appears to be related to: LemmyNet/lemmy#3567
Voyager appears to still proxy for images: aeharding/voyager#517
On the default client, there is a "create post" button for whatever community you are accessing, which is missing on photon, but the top right button replaces that nicely. However, it should probably autofill whatever community you were on when you clicked it for a more seamless experience.
Is your feature request related to a problem? Please describe.
Currently, Only the title of the post leads to Postdetails view ( ie the UI with post and its comments).
It would be nice if clicking the post description or Image ( if imagepost) would also lead to the UI.
Describe the solution you'd like
Clicking on the description would also lead to showing the postview page.
Describe alternatives you've considered
Not relevent
Additional context
Nothing
Photon Instance: https://photon.xylight.dev/
Photon Version: 0.4.20
Browser: Microsoft Edge Beta (Chromium 116)
OS: Windows 11 Insider Preview (Dev Channel)
(you can see this in action at https://nu.lemdro.id)
While writing my contribution in #44 I noticed that the Avatar component (for posts, comments, etc.) appends the query string ?format=webp&thumbnail={width * 2}
to the avatar URL, which requests a WebP format and a smaller size. The navbar avatar does not do this. My personal avatar happens to be quite large (1024x1388), much larger than the navbar avatar needs. Should we append a query string here too?
Example URLs:
Describe the bug
When you sort by read, it seems Photon just pulls a page then hides the posts already seen. This means if you've seen all the posts on the first page but none on the second, when you reload the first page it will show nothing until you go to the second page.
To Reproduce (if applicable)
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
First page after all posts have been read and then reloaded
Second page after first blank page
Versions
With 2da415b we no longer call setInterval
to periodically update the number of unreads and reports the user has. Because of this, we no longer get a notification dot on the avatar icon or the inbox in the dropdown menu.
I've tried to restore this functionality with the following code in src/lib/lemmy.ts
:
setInterval(async () => {
const auth = get(profile)
if (!auth?.jwt || !auth?.user) return
const response = await getClient().getUnreadCount({
auth: auth.jwt
})
auth.user.unreads =
response.mentions +
response.private_messages +
response.replies
if (amModOfAny(auth.user)) {
const reports = await getClient().getReportCount({
auth: auth.jwt
})
auth.user.reports =
reports.comment_reports +
reports.post_reports +
(reports.private_message_reports ?? 0)
}
}, 30 * 1000)
This appears to work for restoring the red notification dot to the inbox in the dropdown menu, but not for the avatar itself.
I can make a PR with this initial attempt, but I'm not sure how to get the notification dot to show up the avatar... looking at the DOM via the web inspection tools, it seems to never actually add the corresponding div
for the avatar, but does so for the inbox menu.
Thanks for implementing #20 so quickly! I discovered that markdown doesn't seem to be parsed in taglines at the moment
No rush, thanks for your work!
Instance admins have full access to moderation tools on all communities hosted on their local instance regardless of mod status. It would be great to show the moderation button in this case as well!
Thanks again for your hard work! Can attach a screenshot if needed.
This is what photon looks like on my computer. There are a bunch of options hidden in a hamburger menu which is very inefficient compared to other Lemmy UIs and new Reddit. What Photon could do, is put the action buttons on the card next to the comments button if they can fit. If its wide enough for only one button and not the other two on a certain width, then show the one.
Is your feature request related to a problem? Please describe.
Sometimes when I'm going through my inbox, I have several messages that I reply to one at a time. It seems like posts aren't being marked as read after I view them, so it would be nice to have a manual "mark as read" button on each inbox entry.
LOVE the work done to show the instance icon in the top left. Only problem is it crops it into a relatively tight circle. This leaves the lemdro.id icon looking in a rather sorry state:
Compared to how it should look:
Maybe just adjust how much cropping the circle does? You can see the bottom screenshot here still does have a circle but it is much "larger". Some other frontends don't even force the circle. It is kind of up to you design-wise. Thanks again!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.