scripting / a8c-FeedLand-Support

A public repo for discussing FeedLand at A8C.
1 stars 0 forks source link

Different ways to spec a news product #35

Open scripting opened 11 months ago

scripting commented 11 months ago

Right now we have two ways:

  1. Via the settings dialog for your first news product.
  2. Create an OPML file with four parts to spec your product.

What about something that developers will feel more at home with?

I think it's a JSON file, with the same top-level entries.

  1. The tabs would be pure JSON.
  2. HTML wrapper for your river, specified by a URL to the file. Don't want to be entering HTML into JSON.
  3. The CSS you want added to the page. Same as with HTML, the URL of the styling for all parts of the page.
  4. The JavaScript code you want added. Same as with HTML, the URL of a JS file.

A theme would be parts 2-4.

scripting commented 11 months ago

@fmfernandes -- i started this thread to discuss how we might do themes in feedland.

this subject came up in another context, where there was a simple solution that works now, but this is something i want to do, and to have it be as comfortable as possible for anyone who wants to use it.

fmfernandes commented 11 months ago

Via the settings dialog for your first news product.

I genuinely like that and feel like it's the easiest way to get familiar with styling news products. Though, I can think of some improvements purely from a developer who sometimes writes CSS perspective:

  1. It would be nice if the field in the settings dialog wasn't a simple input field. A textbox would already work best because if I'm writing CSS, I'd like to get that indentation we see on files.
  2. Syntax highlighting: this would be a nice feature as well just to have a clear understanding of what's going on. There are libraries such as CodeMirror that we could probably use to achieve that on an input field.

That's mostly for customizing my own news products, if we're talking themes, as an user, the first thing I'd think is how I'd install those. I can think of a couple ways:

  1. Like WordPress theme directory: something that I can browse and see a little snippet/preview of how the theme looks once applied to a news product.
  2. Like Obsidian: it has a GitHub repo template for themes so people can clone and build their own and also a theme browser in the app. Themes are curated by the Obsidian team and uses a central repo to keep track of themes and adding new ones.

On all of the above, I didn't think of JavaScript. What's a good use case for having custom JavaScript on a theme/template? 🤔

I think we already have a good starting point for themes (the settings dialog) so maybe improving the CSS editing experience there is a good place to start. Going a bit deeper, it would be really nice to be on your news product page and have a small button bringing up a text editor to edit the CSS of that page while at the same time applying those changes so you can live preview them.

scripting commented 11 months ago

@fmfernandes -- this is great stuff. ;-)

i think the intuition that the Settings dialog provides good prior art for this is the right way to go.

a dialog interface for something that ultimately is going to be output as the OPML file we're currently ingesting.

also have a look at the way the lists folder works here, it seems to me that's a pretty good way to distribute themes as well.

scripting commented 11 months ago

Also I've been thinking about how to offer users a subdomain for their news product.

This comes up almost immediately, look at the exchange betw @cagrimmett re his demo of the newspack product.

We could very quickly add that to this user interface.