lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Sitewide taglines

Open not-layla opened this issue 4 years ago • 8 comments

See https://github.com/LemmyNet/lemmy-ui/issues/556

~~Taglines should be specified in the config file.~~ (See below)

not-layla avatar Jan 29 '22 15:01 not-layla

Not the config file, but as another database table, with API actions to add / edit / delete them. Otherwise admins wouldn't be able to edit these via the site.

dessalines avatar Feb 01 '22 15:02 dessalines

If they were defined in the config file, couldn't they change them via the site in Admin Settings -> Site Configuration? I had a go implementing it that way and it looked like this:

not-layla avatar Feb 02 '22 23:02 not-layla

Couple things:

  • Unfortunately saving that no longer works as a hot reload, and requires a server reboot.
  • If there were more of me, I'd work to take nearly everything in that config.hjson apart from what docker requires, and put it into the site or other tables. Going forward I definitely don't want to add more to that config.
  • You can see on the left side of that page are a bunch of site-related settings already, so these taglines would go under that.
  • I know it takes more work, (adding tables, joins, and more UI), but having API actions is muuuch preferred to putting things in that startup config file because its easier.

dessalines avatar Feb 02 '22 23:02 dessalines

I disagree about putting everything in the database, particularly when we are talking about minor gimmicks like these taglines. Not only is it more work to implement, its also more work to maintain (and we have to maintain it forever). These taglines would probably be set once when the instance is installed, and then changed very rarely, if ever. So its really not worth all the extra effort.

I didnt know that config changes require a Lemmy restart now, if thats a problem we can fix it.

Nutomic avatar Feb 07 '22 13:02 Nutomic

Ideally we wouldn't have to have that config at all, and everything would be possible through API actions. Also I'm sure that admins are going to want to add and edit taglines, and don't want to have to annoy server admins to change that every time.

dessalines avatar Feb 07 '22 15:02 dessalines

I had a quick go implementing them (WIP), it is indeed a lot more effort but yeah Hexbear for example has a lot of admins/sitemods but very few server admins, and since only server admins can change taglines etc they're never changed. The less technical it is to maintain an instance the better

not-layla avatar Feb 07 '22 21:02 not-layla

Starting to pick this one up now. General plan (based on layla's branch) for backend changes

  • New table, 'taglines'
  • New endpoints for GET(One), GET(All), PUT, POST, DELETE of taglines
  • Only admins can do GET(All), PUT, POST, DELETE
  • Update GetSite endpoints to pull a random tagline

Does this plan seem okay?

makotech222 avatar Aug 20 '22 18:08 makotech222

Yep that seems good. The only other thing I could think of is to possibly add a lang_id column (to only show taglines for your lang) , but imo that's overkill, unless nutomic thinks that should be done.

dessalines avatar Aug 21 '22 15:08 dessalines

@not-layla what's the status of these hexbear tagged issues?

dessalines avatar Oct 12 '22 20:10 dessalines

@dessalines There's no active development from our side right now, unfortunately. Is it cool to keep them open until that changes? (The plan has not changed, we just have no volunteers to work on this stuff rn)

not-layla avatar Nov 04 '22 12:11 not-layla

Sure no probs, was just checking in cause its been a while with nothing done.

dessalines avatar Nov 05 '22 01:11 dessalines