Xylight

joined 1 year ago
MODERATOR OF
[–] [email protected] 2 points 3 days ago (1 children)

Photon is available for any instance at https://phtn.app.

Alexandrite is available for any instance at https://alexandrite.app.

I don't like when instances will host photon for anything other than the default interface, as then it's just a more limited, outdated version of photon and another point of failure.

[–] [email protected] 3 points 4 days ago (1 children)

Nice theme!

[–] [email protected] 2 points 4 days ago (1 children)

I wonder what happened to the Auto TLDR bot.

[–] [email protected] 2 points 4 days ago (1 children)

I was asking about the dev console. I pushed an update that fixes this.

[–] [email protected] 1 points 4 days ago (3 children)

What error do you get?

 

There was like 8 prereleases for this because i kept changing stuff. This is actually going to be from v1.31.1 and v1.31.2.

Biggest changes

Command palette

  • Press / or ctrl + p and start typing to instantly go to a page, switch themes, switch accounts, etc.

Theming changes

  • You can now have multiple presets for themes, and there are 5 default presets. (Default, Classic, AMOLED, Catppuccin, Lightly)
  • Admins can set their own default theme for photon with PUBLIC_THEME.

New markdown renderer

  • Photon now uses svelte-markdown for markdown rendering, which lets me use custom components for markdown.
  • Instead of only style changes, I can run actual code, meaning images can be made expandable and codeblocks can be copyable.

Lots of languages

  • There are a ton of languages thanks to the community.
  • English
  • Hebrew
  • Bulgarian
  • Chinese
  • Dutch
  • Estonian
  • Finnish
  • French
  • German
  • Japanese
  • Polish
  • Portuguese

Minor features

  • New "link actions" menu
    • This will have options for archive sites to bypass paywalls, etc.
    • Media bias action was moved next to here, or in here depending on your selected post style.
  • Allow uploading multiple images at a time
  • Select menus use my own components now, making them more powerful
  • Add infinite scroll to communities too
  • Add uploaded media/voted posts in your profile page
  • Using my own service worker now, so caches should work properly

Other stuff

  • Use sharper icons for readability
[–] [email protected] 1 points 4 days ago (1 children)

I dont know if youtube has h264 support

15
submitted 4 days ago* (last edited 4 days ago) by [email protected] to c/[email protected]
 

I've been messed around with random features in photon, and i tried something stupid today.

I was experimenting with an AI post summary feature, (just because i wanted an excuse to make a cool animation) but as I was using it, it actually ended up kind of useful.

If I were to implement this feature, it would only work like this:

  • The user would have to opt-in manually.
  • The user would need to specify what AI service they wish to use.
  • The user would have to specify their own API key, if the service requires one.

In the end, I probably won't add this, since you can just copy/paste the content into an AI app. But it could also be slightly more convenient.

What do you think?

[–] [email protected] 2 points 4 days ago (1 children)

Even as the dev I feel this about photon, i spend so much time messing with dark theme's colors just to end up preferring light mode anyway

[–] [email protected] 12 points 5 days ago (3 children)

It could be that it's playing in a codec that your mobile browser doesn't support like av1 or something. Not sure though, is this happening with every video?

[–] [email protected] 1 points 1 week ago (1 children)

Just curious, how do you compress images? Is there a web API?

[–] [email protected] 2 points 1 week ago (2 children)

Any ideas on a way to make it more intuitive that you can click it?

[–] [email protected] 1 points 1 week ago

Photon actually doesn't have this currently, but it's a good idea, as I moved appointing moderators to community settings. I'll add this soon!

 

I just wanted to say thanks to all the translators of photon! Even if you only changed 1 word, translating this large app is not easy, especially because it's hard to find the context for certain actions.

With all of your help, Photon is now available in 13 languages!

English, Hebrew, Bulgarian, Estonian, Finnish, French, German, Japanese, Dutch, Polish, Chinese, and Portuguese!

If you want to help translate, you can do so at https://weblate.xylight.dev. You can translate as little or as much as you want!

[–] [email protected] 1 points 1 week ago (1 children)

Can it auto detect when a website supports dark theme? Otherwise I noticed that it will ruin the colors of sites already in dark theme

 

This is applicable to almost any piece of software with text in it. When starting your new app, you should make sure you are using a separate language file for the strings in your app. This makes text reusable, and you can change it all in one place.

Once your app gains a community, if you did this, you can also get translators!

With Photon i made the massive mistake of hardcoding everything up until the app became massive, and my PR for un-hardcoding all the strings looks like this:

The amount of lines modified in the GitHub PR. 2,067 lines added, 1,082 removed.

It was worth it though! Because the community has translated it into 11 languages!

 

Photon has a feature on links which gets data from Media Bias Fact Check to determine its media bias. However, I've seen controversy on lemmy.world's bot with this, and I'm not sure if this is the best place to get the data from.

Should I use a different dataset? like allsides'?

19
submitted 2 weeks ago* (last edited 2 weeks ago) by [email protected] to c/[email protected]
 

A lot of admins trying to host photon have been unable to after i switched from Node to Bun server. Bun is a newer server that is significantly faster, but it seems to have caused issues when hosting for weird reasons when people try to host it.

Starting from v1.31.2, I will publish node images as well as bun images, it's very simple to access:

Instead of ghcr.io/xyphyn/photon:tag, do ghcr.io/xyphyn/photon:tag-node

 

When I changed the default theme I saw someone say I should name the classic theme "AMOLED". Apparently, the theme was so dark to a lot of people that it appeared black! I guess my designer's eye and working on photon for over a year made me not notice this.

The classic theme uses a very dark gray for the main background, and an even darker gray for the sides. There was never any black, except in very very early versions of Photon.

10
submitted 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]
 

TL;DR: nonstandard community and user links should work properly now, when people waste their time by doing [[email protected]](https://instance.url/c/community) instead of [[email protected]](/c/[email protected])

rantok so why do people, instead of using the proper syntax for users and communities, ([email protected] and @[email protected]) they take the EXTRA EFFORT to make it a NONSTANDARD MARKDOWN LINK which means linkify-it (which even the official lemmy-ui uses) won't work properly because its meant to make custom syntax like this to work very nicely BUT THEY MAKE IT A MARKDOWN LINK which means I SHOULDNT BE MODIFYING IT but they make it so i have to BECAUSE THEY TYPED EXTRA KEYSTROKES, USED MORE DB DATA, JUST TO RUIN THEIR LINK. JUST USE THE NORMAL LEMMY LINK FORMAT INSTEAD OF MARKDOWN LINK STUFF AAAA ok so get this right people are out here taking the PERFECTLY GOOD syntax for users and communities the one with exclamation point and at sign and whatever and blah but NOPE THAT MAKES TOO MUCH SENSE because im such a GENIUS im gonna wrap in a MARKDOWN LINK. WHY WHY WHY WHY it BREAKS STUFF and make s thing more complICATED i think every lemmy user should be sentenced to 87 years of parsing MARKDOWN WITH REGEX per LINK THEY DO THIS WITH. THIS MESSES EVERYTHING UP stop trying to be sepcial newsflash YOURe NOT JuST stop WITH thiS S

/s

test

13
submitted 1 month ago* (last edited 2 weeks ago) by [email protected] to c/[email protected]
 

This will be a test post for markdown, as I'm switching to a faster markdown renderer that will allow me to do some cool stuff, like allow expanding images and running my code in markdown.

It might release with v1.31.2.

15
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]
 

arguably a bigger update than v1.31, lots of backend changes for better speed

i've been using this command palette a lot because it makes doing everything so fast. let me know if there's any action or link you'd like added, since it's very easy to do.

What's Changed

  • feat: add a command palette by @Xyphyn in https://github.com/Xyphyn/photon/pull/364

    • Press / or ctrl + p or right click the photon logo to bring up the command palette
    • Instantly start typing to find a link, or run an action
  • design: Make compact mode even more compact

  • misc: add infinite scroll to communities too

  • code: rewrite how post feeds are handled, improving speed and cleanliness and allowing more opportunities for caching.

  • misc: add support for upvoted/downvoted posts and uploaded media in the profile page

  • strings: tweak some strings for better clarity

  • Vertical postlink layout for mobile by @sevonj in https://github.com/Xyphyn/photon/pull/360

Full Changelog: https://github.com/Xyphyn/photon/compare/v1.31.0-fix.1...v1.31.1-rc.1

17
Command Palette! (lemdro.id)
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]
 

I'm working on a command palette for Photon, which will allow you to press ctrl + p or / to open a prompt where you can type and go to a page or a recent post instantly.

Are there any actions or links that you'd want me to add?

 

This update is currently available on phtn.app, with a tagged release coming soon. Post navigation is down by 65% and returning from posts is instant.

What's Changed

  • feat: add infinite scroll

    • You can now scroll down infinitely without clicking next!
    • As a bonus, returning from a post page is now instant.
    • Of course, you can turn it off in settings.
    • A virtual list is also used so that infinite posts can be loaded with no performance impact.
  • feat: parse tags from title

    • Tesseract dev and I had the same idea, [tags in brackets] in posts will automatically be converted to a badge/flair. You can click it to search for all posts with that tag in a community.
    • I added options which let you choose flairs to blur posts of or hide.
  • tweak link design

  • improve smaller screen support

  • codebase: move $profile to a derived, immutable store to improve consistency

  • i18n: add new languages/update languages

    • Chinese
    • English
    • Estonian
    • French
    • Finnish
    • German
    • Hebrew
    • Portuguese
  • Update p.darrennathanael.com photon region by @DarrenOfficial in https://github.com/Xyphyn/photon/pull/350

  • Remove empty space left by hideTitle by @sevonj in https://github.com/Xyphyn/photon/pull/352

  • docs: Post component comments by @sevonj in https://github.com/Xyphyn/photon/pull/354

Full Changelog: https://github.com/Xyphyn/photon/compare/v1.30.4...v1.31.0-rc.1

view more: next ›