Photon

1088 readers
1 users here now

Photon for Lemmy

A client for the fediverse that is fast, modern, and intuitive.

This community is a place to ask questions, report bugs, check on the latest updates, or share your experiences with Photon!

You can contact me at @Xylight@lemdro.id.

You can support development at Buy me a coffee

Links

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 2 years ago
MODERATORS
1
16
Photon v2.2.0 (self.photon)
submitted 1 week ago* (last edited 1 week ago) by Xylight to c/photon
 
 

It is recommended to install this update as soon as possible, it contains important security fixes.

What's Changed

  • feat: add piefed polls and events
    • only supported on piefed v1.4.0 which isn't out yet
  • feat: add piefed user notes
    • ditto
  • feat: auto-detect server software type in login form
  • impr: optimize theme css handling, decrease stylesheet size
  • design: revolutionize modal animations by making them zoom out instead of zoom in
  • feat: add a share target to the PWA
    • you can share a link with the app. it won't start a discussion with you unfortunately, instead it'll automatically convert the link to a photon compatible link (so you can open lemmy posts in the app)
  • misc: enable sourcemaps in production for Transparency™
    • no security risk. in fact it improves security because you can see if the source code matches the actual photon source
  • performance: optimize the virtualizer resizeobserver
  • design: use EntityHeaders for instance and community cards
  • design: make toasts look anywhere between 0% and 200% better
  • design: improve the comment context UI, showing a +x more button and an all comments button
  • fix: loading logo not appearing on firefox
  • fix: separate password lengths on piefed and lemmy
  • fix: make PostListShell parameters reactive to fix stubborn sorting
  • impr: various behind-the-scenes improvements in codebase
  • misc: make postbody collapse/expand button sticky so you dont have to scroll toe the bottom
  • fix: moderation report id collisions

Full Changelog: https://github.com/Xyphyn/photon/compare/v2.1.1...v2.2.0

2
13
Matrix room (self.photon)
submitted 3 months ago by Xylight to c/photon
 
 

I realize that I never posted this link publicly anywhere other than my donation page, though it's existed for quite a while.

You can join the matrix room for the photon community here, where you can report small issues, ask for help, or discuss the app.

I've also added relevant links like this to the header of this community.

3
8
submitted 3 days ago* (last edited 3 days ago) by Xylight to c/photon
 
 

TLDR: after/if this is finished, Photon will support no-javascript usage a lot better with authentication and settings respected. It'll be more suitable as a default interface for Lemmy instances.

Photon currently is a client-side only app, with optional guest SSR. This works great as a web app, but not for SEO. While you can enable SSR for SEO, it is not authenticated and will lead to a flash of content from a guest user instead of your profile--making things clunky for actual users.

this pr aims to do the following:

  • Rewrite app-side data to use a unified userHost object that can be filled with either data from a cookie, or localStorage.
  • this will allow for a hybrid mode, where you can either use server-side user data or client-side user data.
  • userHost data is stored in a JSON state, but can be loaded into reactive classes for the client/rendering.
  • Instead of using global state in the form of profile or settings objects, use Svelte's getContext and setContext to access this data.
  • Maintain a near-identical user experience for client-side instances, such as at phtn.app.

This will be relatively difficult, as I'll have to rewrite every instance of those globals being used, and I'll have to update all API calls to go through the server.

4
0
Bug: Image links (lemmy.kde.social)
submitted 2 days ago by sevon@lemmy.kde.social to c/photon
 
 

[![](https://upload.wikimedia.org/wikipedia/commons/4/44/Narrow-banded_dartwhite_%28Catasticta_flisa_postaurea%29_underside_on_Mimosa_pudica.jpg)](https://github.com/Xyphyn/photon/)

Above is an image inside a link. The image is broken.

I poked at the source code and found that MdImage gets passed href of the parent link and not the image url itself. So the image component tries to display https://github.com/Xyphyn/photon/ instead of what its supposed to. It's probably caused by value meant for parent being sent to children via those ...rest params in MdTree, but I couldn't follow that enough to find out how exactly.

Bonus: This bug lets me embed a video straight into the post

[![](https://upload.wikimedia.org/wikipedia/commons/4/44/Narrow-banded_dartwhite_%28Catasticta_flisa_postaurea%29_underside_on_Mimosa_pudica.jpg)](https://www.youtube.com/watch?v=dQw4w9WgXcQ)

5
8
submitted 3 weeks ago by Kory@lemmy.ml to c/photon
 
 

Since yesterday, scrolling is broken for me on Photon Web. The posts are jumping up and down so I lose what I was just reading, new posts are often not loaded and when they finally are, they jump a couple of posts down so I have to go back up to find where I was. Sorry, can't explain it any better. It does not happen on Lemmy.ml or other Lemmy web apps. Any idea what's going on?

6
7
1
submitted 1 month ago* (last edited 1 month ago) by gwl@lemmy.blahaj.zone to c/photon
8
 
 

Anyone having the same issue?

9
9
Photon v2.1.1 (self.photon)
submitted 1 month ago* (last edited 1 month ago) by Xylight to c/photon
 
 

What's Changed

  • design: make media embeds not look like garbage
  • design: make error containers not look awful
  • design: make big community cards not look awful (and make them fully clickable)
  • fix: photon accidentally took inspiration from every article site ever and would autoplay videos from posts when you navigated. this was fixed
  • fix: a poor, alone button was in the command palette. i joined it with the other ones so that you can actually navigate with arrow keys and it looks better
    • it also got a friend, an option to search communities.
  • fix: i made a workaround for a svelte bug (i think). somehow, it would render an {#if} branch even if the condition was false, specifically if you had a dynamic component anywhere. this caused post feeds to have stale data when switching accounts.
  • fix: automatically strip leading https:// from the login prompt, for people who interpret "server domain" as the full fwicking url
  • fix: CommentItem had a shadow when it shouldn't've (that's a word?)
  • fix: when you went to edit your post, it would crash. i fixed

Full Changelog: https://github.com/Xyphyn/photon/compare/v2.1.0...v2.1.1

10
20
submitted 1 month ago* (last edited 1 month ago) by Xylight to c/photon
 
 

What's Changed

  • feat: add piefed support
    • you can log into your Piefed account and browse all available features in the API
    • some piefed exclusive features are available too, like user/post flairs, feeds, and topics.
  • perf: optimize code bundle size -- initial bundle from 780 KB -> 620 KB
    • cool, tf does that mean
      • ok bub this basically means that theres less code loaded initially so stuff loads faster.
    • I rewrote some bad libraries that were bloating up the javascript
    • yes im embarassed the bundle is this high. im getting it lower every update i swear
    • at least its still smaller than lemmy-ui
    • in addition i restructured the entire file tree of the app, and wrote nearly 3000 import statements manually because i have a human soul and i lowk felt filled with determination
  • impr: rewrite feed handling, cache more things
    • post feeds, post pages, communities, feed feeds, topic fe
    • wait a second, feed feeds?? this naming is getting out of hand.
    • ok, in piefed there's "feeds". that's pretty cool. but now the "main feed" can either be the main feed or the main feed.
      • what?
  • impr: use native css for more things
    • this is partially because i am embarassed that i use tailwind
    • i am migrating common components to use vanilla css but with some advantages of tailwind
    • like i can use a compile-time design system and it has nice @variant things
    • this also makes the DOM tree smaller so theres probably some benefit elsewhere...maybe
  • impr: automatically mark inbox items as read when you click jump
  • design: make the modlog not look like absolute buns
    • it actually fits on one screen now and looks nicer. you can now observe the insanity of Lemmy's moderation with more comfort.
  • design: make the mobile navbar not look like absolute buns
    • i made the tap targets bigger too. next update i will make them cover the whole screen
  • design: make the accounts page not look like absolute buns
  • impr: i made the things that should be radio groups actually be radio groups. no problem
  • impr: expandables and comments now use <label> so that it uses browser native html
  • fix: admin detection is better. lemmy removed a property i used constantly for some reason. i fixed that though
  • impr: this one makes me mad. for some reason, native CSS transitions absolutely ruin font rendering (on firefox at least). so i removed some animations or replaced them with svelte ones (js ew)
  • impr: i preload a lot more things on hover/tap now. things will be like 100ms faster.
    • call me john locke in the way i be optimizing ts
  • misc: the term "instance" has been replaced with "server". let's be real, talking about instances makes no sense

Full Changelog: https://github.com/Xyphyn/photon/compare/v2.0.2...v2.1.0

Try now on Photon™©️ (phtn.app) today! 🚀

11
 
 

cross-posted from: https://lemmy.dbzer0.com/post/55547080

I’ve just found out that some Lemmy web interfaces let you sign in with multiple accounts and switch between them easily. Is there any client that can show notifications from all accounts at the same time, so I don’t need to switch back and forth?

I’ve checked out Voyager, Photon, Alexandrite, and Tesseract. They all seem quite similar to me. Which one would you recommend?

12
18
UX suggestions? (self.photon)
submitted 2 months ago by Xylight to c/photon
 
 

I tend to be quite opinionated on design, but I'd like to hear any issues you have regarding:

  • any pages that look bad?
  • any components that can be improved?
  • other ui elements?
13
 
 
14
2
submitted 2 months ago by Ulrich@feddit.org to c/photon
 
 

Hi guys. I dunno if any of you use MacOS but it's fuckin stupid and if you ever click the share icon, it only gives you options to share to/from Mac products. I don't use any Mac products other than MacOS. There's literally no way to just copy a link from the share button. If I just copy the link from the URL bar and send it to someone it will say "mismatching instance" (whatever that means) with no way to resolve it.

I'd like a way to share posts to people not on the threadiverse, but with the Photon frontend, so that it looks less shitty. How would one do that?

15
 
 

a Peertube video in Lemmy

a Peertube video in Piefed

Lemmy didn't load the user avatar for some reason, though thats probably a Lemmy federation issue if anything not Photons issue. But the display of the OG preview is vary different, and I would think that should be the same regardless of underlying server support.

16
22
Photon v2.0.2 (self.photon)
submitted 2 months ago by Xylight to c/photon
 
 

a lot of design changes, not many new features

What's Changed

  • impr: prefetch data from cached post feeds to display post pages instantly
  • impr: sync post page changes to post feed
  • impr: load initial post feed asynchronously to make sure people don't blame photon for the fact that the instance takes 81293578235792385 years to load the post feed
  • fix: use /user endpoint for getting saved posts
  • feat: improve image attachment prompt, allow inserting URL
  • design: improve error containers & toasts
  • design: allocate a bit more space for sidebars
  • design: use secondary style buttons for post actions
  • design: use a common list component
  • design: make tab bars not look like actual human excrement
  • design: better post consistency
  • design: make menus 34.177825% more compact
  • design: re-add description text to placeholders and also make them not look like actual human excrement
  • design: move most community data to sidebar on desktop
  • design: increase comment size on adequately sized screens to improve readability
  • design: make pageination component not look like actual human excrement
  • design: increase line height for markdown to improve readability
  • design: make instances/federation page not boil your CPU and also make it not look like human excrement
  • design: delay progress bar animation so that people think that the app is blazingly fast 🚀🚀🚀🚀🚀🚀🚀
  • design: make sidebars not look like actual human excrement
  • design: make settings page not look like actual human excrement
  • fix: improve tab bar selected route detection
  • i18n: remove flags from language names so my house doesn't get nuked from orbit for using a controversial or incorrect flag
  • impr: switch menus to use Svelte attachment based event handling instead of a horrible, cursed, terrible, inaccessible, awful looking, web design violating, unreactive, garbage div wrapper
  • impr: use a basic feature of every component library (components) for Fixate instead of duplicating the same thing 80x
  • aria: improve semantics significantly for SEO and accessibility
  • misc: add a default robots.txt
  • impr: use a and for comment expansion so that it's actually CSS based and native instead of some javascript atrocity
  • fix: context for comment links is wayy too tiny

Full Changelog: https://github.com/Xyphyn/photon/compare/v2.0.1...v2.0.2

Piefed support next release!

17
 
 

Hi, first of all thank you for all the work you put into photon! I really love the interface and have been using it for many months now.

Today, I noticed that the Favorites folder disappeared, and I was wondering if this was intentional or a bug.

For what it's worth, I will mention that personally, I am a huge fan of ways that help customise our feed - consequently, I loved this folder.

No matter what, thank you for all the work on beautiful photon!

18
25
submitted 2 months ago* (last edited 2 months ago) by Xylight@feddit.online to c/photon
 
 

EDIT: Finished! Piefed support is live on phtn.app.

I took a different approach while implementing it this time and it will be a lot more sustainable.

So far I have most read operations done, but there's a few missing write operations (like saving comments and reports)

I'm definitely planning to support Piefed specific features like multi-communities and user flairs.

Otherwise it should be mostly usable right now.

19
 
 

GitHub has always been generally a platform that doesn't align well with my and many peoples' values regarding open source software development, I only used it because it's the most popular.

Recent events regarding GitHub and its management have raised a greater consciousness about the nature of the service,so I was wondering if it would cause any problems for me to move to either:

  • codeberg.org
  • a selfhosted forgejo instance (git.phtn.app)

Or if everything is fine as is.

20
 
 

PieFed is growing fast, and some mobile apps like Voyager etc. now support it.

It would be great to have more desktop UI options like Photon.

Here are some relevant links for more info. The PieFed API sub: !piefed_api@piefed.social Introduction of App devs integrating PieFed into their apps

Will Photon support PieFed in the future?

21
9
v2.0.1 (github.com)
submitted 4 months ago by Xylight to c/photon
 
 

What's Changed

  • feat: add a static site option by @Xyphyn in https://github.com/Xyphyn/photon/pull/622
  • design: improve comment experience by @Xyphyn in https://github.com/Xyphyn/photon/pull/623
    • better spacing, and separation, as well as easier and more readable font size
  • perf: optimize bundle size by @Xyphyn in https://github.com/Xyphyn/photon/pull/627
    • stuff is now more dynamically loaded which should improve load speed
    • other misc performance improvements
  • security: add a content security policy
  • misc: add a User-Agent for API requests
  • design: use a unified common list component
  • misc: use gradients for placeholder avatars
    • I use placeholder avatars a lot since it's easier to distinguish users based on color/shape rather than username, and this makes it even easier to distinguish
  • feat: add a vote ratio bar option
    • when enabled, if a post is more controversial, a bar will be overlayed behind it to visualize it
  • feat: browse communities of specific instances
    • the available instances are only that you have accounts/guests on as i consider them "trusted"
  • feat: add an SSG adapter
    • admins can build the app with ADAPTER=static and then a build folder will be generated with just the shell. There will be no server side rendering available with this.
  • i18n: sync translations with weblate
    • Bulgarian: salif
    • Polish: gapetto

Full Changelog: https://github.com/Xyphyn/photon/compare/v2.0.0...v2.0.1

22
18
submitted 4 months ago* (last edited 4 months ago) by Xylight to c/photon
 
 
23
 
 
24
41
Photon v2.0.0 (use.phtn.app)
submitted 4 months ago* (last edited 4 months ago) by Xylight to c/photon
 
 

This is a very big release since v1.31.4. If you've used phtn.app, you won't notice a difference, since that runs on the latest commit.

TL;DR

  • Photon has been completely rewritten to use Svelte 5
  • This brings significant performance improvements
  • The UX has been changed to fit Photon's philosophy more closely
  • Many issues have been resolved and bugs fixed
  • 60% of changes are under the hood, but there's many visible ones too

What you'll notice

Snappier performance

  • Svelte 5 optimizes a lot of the reactive parts of the app
  • I've also spent a lot of time on a new virtualizer, which runs a lot faster

Design changes

  • While the overall layout is relatively the same, I've reworked a lot of pages to fall more in line with my design philosophy.
  • The design across (most) pages is much more consistent
  • There's a new default theme
  • Compact mode is now the default (if you've used photon before, this will not affect your setting)
  • Comment layout is slightly different and more intuitive
  • Modals now create a backstack so you can press the back button on your browser

New features and options

  • More moderation features
    • Quickly view users'/submissions' moderation logs
    • View the users' votes n a post
    • Grouped reports for many reports on the same post
      • you can resolve many at once
  • Options for more granular control over how links work in posts
  • Option to reverse the action row
  • Option to use absolute timestamps
  • lemmy language tagging support
  • Command palette now has contextual navigation options
  • Contextual warnings for certain actions (like missing languages in posts)
  • Messages page has been overhauled with markdown, contextual actions, etc
  • Better view and options for modlog page
  • Donation dialog as Lemmy requested

Optimizations

  • Uses CSS animations more often which are faster
  • Uses svelte context API to reduce prop drilling
  • Navbar uses CSS rather than JS for positioning
  • Uses optimized svelte $state rather than stores

Languages

Thanks to the community making translations on the Weblate, Photon has support for 18 languages!

  • English (100%)
  • Hebrew (58%)
  • Arabic (33%) (fxomt)
  • Bulgarian (72%) (salif)
  • Chinese (Simplified) (91%) (qiancsf, CDN, binary3141)
  • Chinese (Traditional) (21%) (binary3141)
  • Dutch (81%) (qaz)
  • Estonian (24%) (pewgar)
  • Finnish (94%) (sevon)
  • French (87%) (Blisterexe)
  • German (64%) (poVoq, Tywele)
  • Hungarian (55%) (myedition8)
  • Japanese (84%) (Rentlar)
  • Polish (83%) (gapetto)
  • Portuguese (78%) (tmpod)
  • Russian (83%) (WerySkok, mudkip)
  • Spanish (81%) (acidrums4)
  • Turkish (91%) (ikanat)

In the future

  • Piefed support is targeting v2.2.0
    • With the way it is being written, Mastodon support may as well come sometime around v3.0.0

There's a lot more in this release, as well as more to come. I'm trying to make Photon closer to its design philosophy, which can be summarized as:

It should not take more than 3 seconds to identify an action you wish to perform within a given container or page.

This covers a lot of reasons why I design stuff the way I do, for example, you'll never find more than 5 buttons (minus links) in a single container. Additionally, specific types of actions will usually look different, like primary actions on a page versus sub actions.

I hope you enjoy this release!

Full Changelog: https://github.com/Xyphyn/photon/compare/v1.31.4...v2.0.0

25
 
 

Photon is two years old now! (I missed the birthday which was 2 weeks ago. :< )

I've done these posts a few times during Photon's early days, and they've been helpful.

2.0 is almost out, I'm done with pretty much everything and it's stable enough. There's bug fixes in here that make it arguably more stable than the current "stable" release.

I ended up with a bit of a "RobTop and 2.2" situation working on this update.

if you're on phtn.app you're always on the latest commit, and if you're using lemdro.id, p.lemmy.world, or photon.slrpnk.net, you're on the latest 2.0 beta.

Ill make a big release note once it's out, but for now:

Are there any new features that you'd like?

Currently planned is:

  • Piefed support (targeting v2.2.0)

Side noteThank you to everyone who supports and uses Photon, this has been my most motivated project and I'm glad it's useful to some. I've started to recognize the usernames of all the translators and those who are active in this community. I'm not planning on dropping this project anytime soon!

view more: next ›