Xylight

joined 2 years ago
MODERATOR OF
13
submitted 21 hours ago* (last edited 17 hours ago) by Xylight@lemdro.id to c/photon@lemdro.id
[–] Xylight@lemdro.id 5 points 23 hours ago (1 children)

As in a regex or ..?

An ipv4 parser would also be sorta difficult.

you have to account for the fact that all the octets can be added to decimal: http://2130706433 (valid 127.0.0.1)

or the fact that octets can be in different formats: http://0x7F.0x0.0x0.0x1 (127.0.0.1)

or the fact that you can mix octet formats: http://0xC0.0250.0.1 (192.168.0.1)

[–] Xylight@lemdro.id 1 points 2 weeks ago (1 children)

I looked at threativore's REST API, and it raised a question about how the flairs should be displayed.

Were user flairs intended to be displayed inline in a comment section next to their username? Or if you specifically visit their profile? I ask this because there's only an API endpoint to get details regarding a single user, which would require dozens of API calls for a single comment section or post feed.

[–] Xylight@lemdro.id 1 points 2 weeks ago (2 children)

I generally try to make photon depend as little as possible on external APIs, especially specific ones.

However, I was thinking of a system to let instance admins choose for themselves if they want their hosting of photon to have it, perhaps through a "plugin" system. I could add a threativore/fediseer plugin that you could specify configuration to.

I probably wouldn't add it on my phtn.app, but I can add "plugins" so that you could use it on lemmy.dbzer0.com.

[–] Xylight@lemdro.id 3 points 2 weeks ago (1 children)

I'm still updating this daily, I'll get that in there soon. I only made the "stable" 2.0 release now because I wanted to get all the instances using the ancient v1.34 up to date

[–] Xylight@lemdro.id 3 points 2 weeks ago (1 children)

I'm really sorry about that, I used a different script to generate the translation reports for this release note than the credits page in the app. The first one only took the top 1 translator, and then I filled what I thought I missed.

I edited the post. Translation is a great dedication of time and I apologize for not recognizing the time you put.

23
[Photon] v2.0.0 (use.phtn.app)
submitted 2 weeks ago* (last edited 2 weeks ago) by Xylight@lemdro.id to c/lemmyapps@lemmy.world
 

cross-posted from: https://lemdro.id/post/25562194

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)
  • 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

[–] Xylight@lemdro.id 1 points 2 weeks ago (1 children)

Just change the image version. It should work as normal:

image: ghcr.io/xyphyn/photon:v2.0.0 # preferably use latest

or from the shell

docker run ghcr.io/xyphyn/photon:v2.0.0
34
Photon v2.0.0 (use.phtn.app)
submitted 2 weeks ago* (last edited 2 weeks ago) by Xylight@lemdro.id to c/photon@lemdro.id
 

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

[–] Xylight@lemdro.id 2 points 2 weeks ago

"are we serious" whenever something negative happens

[–] Xylight@lemdro.id 2 points 2 weeks ago

I changed it to just use your browser background now.

[–] Xylight@lemdro.id 15 points 3 weeks ago (1 children)

Not to advertise, but you could try Photon. It's what Tesseract was forked from wayyy back as me and the tesseract dev's philosophies split.

It's more opinionated, and features are carefully organized compared to Tesseract where plenty of shortcuts and links are given (which isn't bad at all, just targets different preferences).

 

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!

38
submitted 1 month ago* (last edited 1 month ago) by Xylight@lemdro.id to c/photon@lemdro.id
 

I am currently working on alpha PieFed support for Photon.

The PieFed API is missing a lot of features from native PieFed, so not all functionality you'd expect will work (notably, the inbox.) I can't do anything about this until those features are added to the API.

The way I'm writing this will also allow Mastodon support in the future.

Status

I've already implemented basically the entire AVAILABLE PieFed API. You can try a beta here.

You can view my progress at via the pull request on GitHub.

 

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.

 

You have become the very thing you swore to destroy

 

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

 

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

36
submitted 5 months ago* (last edited 5 months 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.
21
submitted 9 months ago* (last edited 5 months 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.)

view more: next ›