GithubHelp home page GithubHelp logo

diamondburned / slemmy Goto Github PK

View Code? Open in Web Editor NEW
44.0 3.0 0.0 1.26 MB

Lemmy client in Svelte

Home Page: https://slemmy.libdb.so

License: GNU Affero General Public License v3.0

JavaScript 5.12% Nix 0.18% HTML 2.28% Svelte 69.36% TypeScript 14.00% SCSS 4.78% CSS 4.28%
lemmy svelte

slemmy's Introduction

Slemmy

Website Link Badge Netlify Status

Cute Lemmy web app written in Svelte

Features

  • WS support
  • Multiple instances (profiles support)
  • Posts feed
    • Autoload on scroll
    • Filtering and sorting
  • Comments feed
    • Autoload on scroll
    • Filtering and sorting
  • Logging in
    • Upvoting
    • Commenting
  • Community feed
  • User info popup/page

Rants

Why Tailwind?

No good reason. Initially I wanted to try out a seemingly-good CSS framework. It turned out to be awful, and so did Tailwind.

My advice? Never use Tailwind. It's a waste of time.

Misc

Favicon License

The favicon is taken from OpenMoji, which is licensed under the CC BY-SA 4.0. It is color-altered to be pink.

Libraries

See package.json.

Building

You shouldn't need to build this project just to use it, but for development, you can use the following commands:

npm i # install dependencies
npm run build # build the project to ./build/

You can also use npm run dev to start a live development server.

slemmy's People

Contributors

diamondburned avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

slemmy's Issues

Remove preferred connection method in profiles

Now that HTTP CORS is officially in 0.18!. 1rc10 and newer, there's no point in having a preference for connection method anymore.

In the future, all servers will work over HTTP, so detecting it automatically is acceptable.

Fix PWA

image

Will need a bigger version of the mouse favicon.

Websocket/HTTP abstraction

Since Lemmy is gradually moving from WS to HTTP, we should have a wrapper library that automatically detects if we can use its HTTP API.

Since we already have an API that effectively turns the WS into a request-response API, this should be trivial.

The following needs to be done:

  • Code generate Op-to-URL-route mappings
  • Abstract WS client behind an opaque API (request(op, data) -> response)
  • Make a HTTP client wrapper implementing that same API
  • Detect on profile creation if the HTTP API is successful, falling back to WS if not
  • Also having a client that can automatically fallback would be great.

[Question] How to input TOTP ?

Hi,

I input instance, username and password, but TOTP was greyed out.

Then I thought maybe I have to submit once before it would ask for TOTP, but I got the missing TOTP token error and the input remained greyed out.

What did I miss ?

Thanks

Show post previews

It would be cool if we can show a short 3-liner that previews the post right in the main screen like what the official frontend does.

This should eventually be configurable. We just need to design a settings page, which shouldn't be hard at all.

Post forever loading when 0 comments

Slemmy doesn't check if the post is supposed to have a comment or not. If no GetComments events are received after sending a GetComments (server bug), then Slemmy will assume that the server is still working on the response and never hide the loading circle.

Adding a simple check should work most of the time (though won't work all of the time when using a filter).

Limit rendered posts

We should limit the number of visible posts to a certain amount like 50 to prevent the browser from choking when we're scrolling a lot.

When the user scrolls up, we should add the posts back slowly.

Rate limit post fetching

Once every 1-2s is good enough. Ideally don't fetch at all if we know there's no more posts left (length is 0).

Allow deleting profiles

Unsure how to do this. Should the user hold the item? Should there be an X button? Maybe hide the X behind a mode and tuck it into a hamburger menu?

Fix Tailwind Prose

Screenshot_20230623-013646

I hate Tailwind :/

A few other elements are also broken:

  • code (here)
  • h1-h6
  • (might be more)

Fix might be to force !important with a more powerful selector like body .prose.

Open local-instance URLs in Slemmy

Slemmy should change all URLs within a post of the same instance to go to /p/:id by default. It would even be nicer if we could somehow ask the instance for a post from a difference instance.

Linear thread styling

Would you accept a PR that adds support for forum threads with linearly ordered comments as an alternative display mode for boards (communities) that opt into it?

Basically like LemmyBB, but in a modern style closer to Discourse/NodeBB rather than phpBB.

Certain modes of discussion are better served by a linear flow, e.g. troubleshooting or feature ideation. There is however no reason why such discussion boards shouldn't co-exist with nested discussion boards on a singular instance & interface.

Examples:
https://users.rust-lang.org/t/pattern-to-use-when-avoiding-arc-or-similar-smart-pointers/95927/
https://users.rust-lang.org/t/cargo-release-took-8h-while-debug-finishes-in-25s/96015/
https://internals.rust-lang.org/t/idea-implied-enum-types/18349
https://internals.rust-lang.org/t/variadic-generics-design-sketch/18974/

Slemmy spamming server when no posts returned

Seems like it keeps thinking we need to fetch more posts because "they all fit on the screen!" when in reality there's nothing to fit.

Will need to add a give-up condition, something like "if page == 2 && posts.length == 0".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.