Photon

411 readers
11 users here now

Photon for Lemmy

A client for the fediverse designed to be intuitive, fast, and beautiful.

Share your themes, ask questions, report bugs, or check on the latest updates here!

You can contact the dev at @Xylight@lemdro.id.

Rules

  1. Posts must be related to Photon in any way
  2. Don't be mean
  3. If your post is a bug report, please preface the title with [solved] if it's been fixed.

founded 1 year ago
MODERATORS
1
30
submitted 1 month ago* (last edited 1 month ago) by Xylight@lemdro.id to c/photon@lemdro.id
 
 

The Svelte 5 migration has progressed enough that I think it's safe to release betas now.

Docker tags are released for 2.0.0-beta.2, and you can access the latest beta yourself at https://svelte-5.photon-8na.pages.dev/.

I've made a few UX changes to match the new codebase, I hope that this release is good for you.

Please let me know of any major issues.

Issues I've noticed (I will fix as soon as I am available:

  • Post mutations don't save when you navigate, when you go back, they are reverted.
2
6
submitted 9 months ago* (last edited 9 months ago) by Xylight@lemdro.id to c/photon@lemdro.id
 
 

Photon has been fully localized and you can translate it to your native language now! (will not be released until v1.30)

You can help translate at the Weblate

If you need help, you can join Photon Translators Matrix room.

Ask for as many clarifications as you need.

Requirements

  • Be fluent in the language you're translating to.
  • No Google translate or other translation tools, as they are often inaccurate without context.
3
 
 

Hey, I noticed that the expand/collapse button tends to block text sometimes. Is there any way that it could be made transparent when hovering the mouse over it? Also, the hover text should say 'collapse' when the text has already been expanded.

4
4
submitted 1 day ago* (last edited 9 hours ago) by undone@lemm.ee to c/photon@lemdro.id
 
 

Hey ๐Ÿ‘‹

Just started self-hosting photon app a few days ago and am very interested in your experiences?

Running on v2.0.0-rc.4 and just love the UX in comparison to lemmy native. I am experiencing some issues though. Nothing too major. Some issues might be due to me being inexperienced self-hosting. Also don't want to clog github issues with unwarranted claims.

Hope some of you can chime in with your experience here and help me find the root cause. List ordered by personal preference:

  1. Random loading issues when sorting by Hot/Twelve hours. Might be related to my main instance lemm.ee. I think they did change some server settings (cloudflare, DDOS IIRC and downtime a few days ago) and around the same time the issues started. I click my bookmark for the photon front page and the screens stays black with only the logo in the center. If I manually remove the sort setting from my browser local storage it starts working again, but can not select Twelve hours. Happens a few times a day at random. Other times it works. Have not tried to reproduce in phtn.app when it happens, but will the next time. Browser console says failed requests, might be some server-side blocking of lemm.ee? Would be great if photon did catch the exception and show at least the UI instead of the loading screen. You can not navigate anywhere / fix the UI when it was opened with a direct link.

  2. Posts don't refresh after changing sort params, only after hard page refresh. Seems to be an issue - saw it on github already and a comment that this was fixed a few hours ago. => Is there an easy way to run master branch bleeding edge instead of tagged releases? Currently only self-hosting for myself and nobody would notice restarts / downtimes.

  3. Pinned custom menu items gone since the latest stable version. Might have just been dropped on purpose? Could not find an explanation or issue on github though. Was a nice feature.E.g. there seems to be no way to go to the front page other than clicking the photon icon in the top left corner. Or a quick way to jump into my own submissions, etc.

  4. Custom favicon not working I think I set the param right and I see my favicon path inserted into the source code. Path works and image is served if I open it manually in browser. Maybe only if photon is not tied to a single instance?

  5. Minor personal preference: on really large screens it would be great if the top navigation bar would not stretch full screen width, but start and end with the main sidebar & content area. The top left logo and buttons in the top right corner disappear to the very far edges and make photon harder to use.

Looking forward to hear about similar experiences and find out what I'm doing wrong / raise valid issues & feature requests on github.


Edit: Also automatic "mark read" of the inbox notification badge seem to be wonky. Have not had time to debug in detail, but it only works some times. Not that big of a deal though as there is a dedicated "mark all read" buttons.


Edit 2: 2.0.0-rc5 was released a few hours ago and fixes the major two issues. Thank you @Xylight@lemdro.id !

5
 
 

cross-posted from: https://feddit.org/post/9414466

See big red box on image attached (collapse as in the feature on reddit)

There is also a container feature already. I marked it at the bottom of attached image with a smaller red box

6
 
 

cross-posted from: https://feddit.org/post/9377399

I dont see any posts in this forum, is this a me issue? (sorry am new)

7
 
 

It's been on a separate URL for a while now but it is now on phtn.app.

It hasn't been merged to main yet and has not been put as stable release, but i believe it is stable enough to bring to my URL.

Once the stable release is out, I will write release notes. This is the svelte 5 version.

8
 
 

that's it

9
 
 

The post: https://sh.itjust.works/post/33016821

The spoiler is working on the post page but not the preview from the community feed.

I'm using Firefox desktop with phtn.app

10
 
 

So the overall layout won't change, and if you're using default navigation settings, you'll barely notice any difference.

Instances using Photon with SSR have rightfully complained that there's a layout shift between server load and hydration. This happens because the current navbar's position isn't determined by CSS, but by calculations in JavaScript. This is pretty messy and bad.

I rewrote it to be CSS based so that this shift won't happen, and it also simplifies the code quite a lot. However, there's one downside, you won't be able to manually customize the position: the navbar will be a top panel on desktop, and a bottom dock on mobile.

One new feature in this is that on mobile, the bottom dock will hide when you scroll down and re-appear when you scroll up at all. You can disable that in settings.

I consider Photon an opinionated client (of my opinion), but I also want to make sure this isn't a dealbreaker for anyone.

Github Link

Preview URL

11
 
 

I use Lemmy for bigger news and all that, but sometimes I like to showcase little things I've done in Photon or tweaked. Maybe even hold polls there.

Should I post mini updates there? Lemmy will still be reserved for the big ones.

@photonlemmy@mas.to

12
 
 

Photon I feel is a representation of my general ability to do software development, as it's my biggest project. I'm disappointed in myself for how it's been going so far suddenly.

I go through these switches in terms of my philosophy with software, and I guess right now I'm in the "it should do what it should well and expectedly, stop trying to do more and sacrifice the main functionality" phase.

I don't like where Photon ended up, I added too many """features""" that were half baked and just complicated the codebase and added more issue vectors. What people use the most: posts and commenting, have been suffering in their usability with random bugs and a non-seamless experience.

I've also been going much too slow on my promises for Svelte 5, and I can't change much until I've finished that or I'll get conflicts. I've been too lazy because of school and my life.

As soon as I finish the svelte 5 migration, I'm gonna change these things:

  • No more features that are out of scope. The "translation", link shortcuts, etc, are going to be removed or gutted.
  • I'm going to switch a lot more systems to be component based, no more one-off buttons and inconsistent interfaces.
  • This app will focus on Lemmy and follow it more closely if it's not bad UX.
  • I will switch to a lot more native systems instead of using cursed JavaScript powered ones. For example, I have to make the dock change via CSS instead of checking and changing dynamically in code.
  • Most pages must work server side, and the entire app must be usable somewhat.
  • I'm still conflicted on whether I should make photon run its authentication logic, etc server side or if that can stay client side.

I still am obligated to continue work on Photon, and I need to fulfill the promises I make. I hope Photon will be better in 2025.

13
 
 

Basically, title. It started happening a few weeks ago. Sometimes it happens right away and freezes the whole DE, more often it happens after scrolling for a while. I know nothing about .js so let me know how I could help diagnose it.

I'm using phtn.app, Firefox 133, Wayland, Fedora 41.

Thanks!

14
10
submitted 3 months ago* (last edited 3 months ago) by Kory@lemmy.ml to c/photon@lemdro.id
 
 

Thank you for this beautiful app!

I have a minor issue I cannot seem to resolve - the upvote/downvote count vanishes immediately after reloading the page. I am using Librewolf (that is based on Firefox) and I have tried to disable uBlock Origin entirely but I can't get it to display correctly. Anyone else ran into this and found a solution? Thanks!

Image attached how it looks for me.

EDIT: Thank you for the responses, I'm not entirely sure what I did, but now it's working as intended. I'm very happy about that because Photon rocks!

15
 
 

Hey, I noticed a small visual bug where sort comments button doesn't update after choosing a different selection. The comments still sort just fine, it's just the button that doesn't update.

16
5
submitted 4 months ago* (last edited 4 months ago) by poVoq@slrpnk.net to c/photon@lemdro.id
 
 

It seems like contrary to Lemmy-UI, Photon does not display the user supplied post language anywhere and also has no way to set the post language in the UI. Nor does it have the profile setting to set language visibility.

I generally think that this feature in Lemmy-ui causes more harm than good due to the various ways in which people accidentally deselect "undetermined" as a language option, or how community mods accidentally prevent people from posting due to strict language restrictions... and a bunch of other related bugs that caused me to abandon this feature.

But having no representation at all seems like a bad idea given so much of Lemmy uses that feature and it also seems like Photon does hide wrongly language tagged posts if people misconfigure their profile settings in Lemmy-ui?

I can't confirm the latter, but this report https://slrpnk.net/post/14769073 sounds a lot like that is what is happening.

17
21
submitted 4 months ago* (last edited 1 month ago) by Xylight@lemdro.id to c/photon@lemdro.id
 
 

Approximately 70% complete

Photon uses Svelte.js as the main JS framework for the UI. Photon uses Svelte 4 currently, but Svelte 5 was released and has a lot of benefits for the codebase. It's also a lot faster.

However, the paradigm for Svelte 5 is a lot different and almost the entirety of Photon might have to be rewritten.

Luckily, there's a migration tool that can do a lot of the work for me. However, I've still got to fix about 3,000 lines of code and 70 different files to work properly with Svelte 5. There's also gonna be a lot of hidden bugs I'll need to fix.

Because of this, I won't work on any new features for the next month or so, so that I can get this as done as fast as possible.

Generally you won't notice much other than slight behavior changes due to minor code structure changes, or maybe a bug or two.

Once I'm finished, I'll make another announcement and you might notice photon feeling a bit faster!

Once it's been confirmed stable I'll release docker images.

You can see my progress here

Other notes

Browser support drops

Very old browsers probably might break. I'm talking Internet Explorer (although I'm pretty sure that was already broken. I don't care if Photon doesn't work on IE.)

18
 
 

I usually don't like orange/brown themes but I think this one's cozy. I decided to make it for the autumn season.

{"slate":{"25":"255 248 240","50":"253 244 232","100":"251 236 221","200":"246 220 198","300":"240 195 165","400":"219 162 122","500":"196 133 89","600":"133 108 89","700":"89 72 59","800":"66 54 44","900":"44 36 29","950":"33 27 22"},"zinc":{"50":"255 243 230","100":"250 228 207","300":"227 186 156","400":"204 144 105","500":"181 102 54","600":"120 96 79","700":"82 66 54","800":"61 49 40","900":"41 33 27","925":"33 26 22","950":"25 20 16"},"primary":{"100":"255 245 235","900":"122 48 0"},"other":{"black":"25 20 16","white":"255 252 248"}}

To import, go to Main menu > Themes > Click the + to make a new theme > Import > Paste and import

19
 
 

I used to ask these a lot during Photon's early development, but I decided to do one now.

Are there any major features you'd like added or issues you'd want fixed?

20
9
Replace lemmy-ui (buddyverse.one)
submitted 5 months ago* (last edited 5 months ago) by mitexleo@buddyverse.one to c/photon@lemdro.id
 
 

Hi,

I want to replace lemmy-ui with photon. How can I actually do this? Do I need to just install it using docker and reverse proxy to the port? Is there any docker compose method? Where can I set the environment variables?

TIA

21
34
submitted 5 months ago* (last edited 5 months ago) by Xylight@lemdro.id to c/photon@lemdro.id
 
 

Saw people on slrpnk.net were looking for a photon theme so I decided to make one. I'm not necessarily expecting this to be used at slrpnk.net, but I like the theme so I'll be using it. It has a nice light theme too.

It's pretty similar to a recent post for a "wintergreen" theme, this one is less saturated.

{"slate":{"25":"245 248 247","50":"235 242 241","100":"225 236 235","200":"205 218 222","300":"185 200 209","400":"155 172 186","500":"125 144 163","600":"95 116 140","700":"75 98 122","800":"55 80 104","900":"35 62 86","950":"25 44 68"},"zinc":{"50":"245 248 248","100":"220 235 233","200":"185 214 210","300":"143 185 182","400":"103 154 151","500":"77 127 125","600":"60 101 100","700":"51 82 82","800":"44 66 67","900":"35 51 51","925":"27 41 41","950":"20 31 32"},"primary":{"100":"180 200 199","900":"30 65 64"},"other":{"black":"20 20 30","white":"245 248 247"}}
22
 
 

I'd like to learn about the community that uses Photon, so I've decided to make a survey! You can answer it if you like. In about a week I'll collect the responses and see if anything's interesting, and then I'll make a post showing any discoveries.

The survey just has a few questions about demographics, Lemmy usage, and knowledge of Photon's features.

23
 
 

this security issue can only be triggered by users fault, but it's up to the UI designer to prevent user mistakes causing potential credential leaks.

The login page

The login page is designed to be as simple as possible. Only 1 page, no extra steps. It'll validate whatever instance url you type in to ensure it's actually a Lemmy instance.

The problem

If the user mistypes the instance url to a typo squatting instance, your credentials were just sent straight to them. Bad. For example, I could setup an instance named lemmu.world, and if someone accidentally mistypes lemmy.world as that, I get their credentials for free.

Potential solutions

I'm not sure which one would be best as they all have problems.

  • Require you to type the instance before you can start typing your credentials.
    • This complicates things and adds an extra step. This also wouldn't completely solve the problem.
  • Add an auto complete list
    • This will work for popular instances as they'll know that they have the wrong url because it disappeared from the auto complete. However, I'd need to keep this list updated and id prefer photon to have minimal external ties. This also wouldn't work for small instances.
  • Add typo checking
    • This has the same problem as above as I'd need to keep common misspellings updated and I want photon to have minimal external ties.

Any ideas? For now, this isn't a problem as long as you double check the instance you're logging in with, and there's no cases of this AFAIK.

24
 
 

TL;DR

Vercel has been a PITA for a few reasons I won't go into, and I eventually reached a usage limit that made the site unusuable. Cloudflare pages has no usage limits, so I have switched to that. Nothing different should be noticable, except that initial loads might be slightly faster.

if you don't like cloudflare

I understand lots of people dislike cloudflare, so if you want to get away from it, here are some publicly hosted instances:

Instance Location Contact
phtn.app (Official) ๐Ÿ‡บ๐Ÿ‡ธ US West photon@xylight.dev
photon.thesanewriter.com ๐Ÿ‡บ๐Ÿ‡ธ US East thesanewriter@lemmy.thesanewriter.com
p.darrennathanael.com ๐Ÿ‡ฎ๐Ÿ‡ฉ ID West noc@darrennathanael.com
phtn.ngn.tf ๐Ÿ‡น๐Ÿ‡ท Turkey services@ngn.tf
lm.sudovanilla.org ๐Ÿ‡บ๐Ÿ‡ธ US East hello@sudovanilla.org (behind 1 version)

You can also selfhost it if you'd like.

git clone https://github.com/Xyphyn/photon
cd photon
npm install && ADAPTER=node npm run build
node ./build/index.js 
25
 
 

Just a few moments ago learned about phtn.app, as I was using photon.lemmy.world. I'm trying to use it with KDE's Falkon web browser, my daily web browser in desktop, which is based on chromium (though as far as I know it's not cutting edge chromium).

photon.lemmy.world works just fine, but I don't get to pick spanish from the available languages - while in phtn.app is there (I used Firefox's web browser to check it and learn there's quite a few differences between phtn.app and photon.lemmy.world).

The thing is that phtn.app stucks on the loading screen (the circle spinner) with Falkon. Not sure if it's Falkon being funky or there's something that could be done on phtn.app. All I can see in the web inspector is the following:

Not wanting to pull Firefox/Chrome/whatever and all their dependencies just for this, so I'd like to know if this can be addressed in phtn.app's side.

view more: next โ€บ