pvrs12 / Anesidora

Anesidora - Pandora extension for Firefox
Other
31 stars 8 forks source link

Redesign v3 Thread #93

Open hucario opened 3 years ago

hucario commented 3 years ago

for some reason I keep coming back here it's probably because I like the project and I use it probably the most out of any of my browser extensions anyways I updated the ui a tiny bit. you may not want to push this to main because... maybe three ui updates in a year is a tad too much for longtime users? I've changed it a bit more to adapt to high popup heights because I switched to Vivaldi and made it a webpanel which is as high as the screen, as opposed to chrome popups being limited in height to I think it's 599px?

was I saying something? oh right yeah so here are the changes I've made and a few screenshots

that said, I did break theming a little bit because I figured I wasn't going to share these modifications ✨ but then I did ✨ so I'll need to fix that

again, no pressure to add this. tell me if you do want it though so I can fix the issues that I don't care about but would matter were it to be released to the public (mostly how I broke theming a tad)

screenshots Main player pane: ![image](https://user-images.githubusercontent.com/50851047/137604582-21944f3f-aa72-4059-8831-3f0c28b805b2.png) Stations pane: (I figured that since station names are long, they should have more room, so 3 per row -> 2 per row) ![image](https://user-images.githubusercontent.com/50851047/137604588-d9bf2fa9-90cf-469c-bbb4-e909bc3f0a3f.png) Main player pane, in a Vivaldi webpanel (meaning it has enough height to have the cover "comfortable"): ![image](https://user-images.githubusercontent.com/50851047/137604627-31840c84-0ec7-45e1-807d-4561a1d66761.png) Inter vs sans-serif comparison: (See especially the album & artist names) ![image](https://user-images.githubusercontent.com/50851047/137606682-961124e4-627c-4fc8-a0ee-6f37ab099cee.png)
fruit by the footnotes [1] details on how it does this: the cover is actually set to have a `height` of zero, but with `flex-grow` set to 10 so that it _can_ grow, but only if there's free space. because the other elements aren't absolutely positioned anymore, they have a say in layout and thus can bully around the cover into being smaller. turns out that if you don't use hacks in the first place you don't have to use hacks later
lovelydumpling commented 3 years ago

On the history panel, the inter text looks a lot sharper than the sans-serif, definitely a better font to be sure. I personally would love all these changes, really like what you've done with it.

hucario commented 3 years ago

Changed a few things:

https://user-images.githubusercontent.com/50851047/137649084-7641c45f-acd1-40a8-9f7f-22c9e756995e.mp4

this is being worked on at hucario/Anesidora:vivaldi-webpanel

it's still not ready for broad usage, mainly because I screwed with the theming settings

hucario commented 3 years ago

I'm not certain how but now anesidora-as-a-tab looks good

I didn't specifically design for this but it looks good and sure I'll keep it

image image

pvrs12 commented 3 years ago

Howdy! I'm sorry I haven't been up-to-date with this in recent history. Work and life has been super busy.

I'm going to give you push perms to the repo. Your UI skills are far beyond mine and I trust your judgement on these things. I'm sorry I can't be more active in the dev right now...

Once you've got a build ready lmk and I can release it on the Mozilla app store

hucario commented 3 years ago

Alright. I'll wait until I've got everything fleshed out and working, then wait for your consent, then push to main.

To-do:

hucario commented 3 years ago

whoopsie, I may have accidentally reimplemented the entire history pane in the form of those sidecovers I made previously now I just need to get the song transition working again video (couldn't put it on github because it's a ✨large file✨) It's a little laggy, but that's because I'm recording large video and have a trash computer, not because it's actually doing that much work this is what happens when I let myself get distracted while working on UI

I've also done a little bit of work on a reworked options page but it's nowhere near functional yet:

https://user-images.githubusercontent.com/50851047/139377386-9d2b823d-8a8c-4aa2-bd1a-95ea3e038e6c.mp4

hucario commented 3 years ago

image This interfaces gives options, by the way

so I'm adding a few things to my to-do:

hucario commented 3 years ago

update: "skip to song" and "remove from playlist" now work I also got the autoscroll to work. it was janky as hell and took two days and I still don't know why it works?? but it does now and I'm not screwing with autoscroll ever again dear GOD

I've decided that the favourite button is a can of worms I don't want to open, so here's the updated checklist:

screenshot / video:

https://user-images.githubusercontent.com/50851047/141905829-12a4c55d-ebfe-4d5f-9203-5f4a6854f823.mp4

pvrs12 commented 3 years ago

Hey, it's been a minute! These are looking great!

I'm looking to test this out for myself a little bit. Is the code available on your fork? I didn't see it, but I also didn't check every branch.

How do things look in the popout? I'd like to be able to keep that functionality and have a button/option to put new.htm in its own tab.

I went ahead and merged the changes for lazy loading and packaging and have released your fix for the request spamming. The packaging one should make it a lot easier to release test builds for everyone (especially @lovelydumpling).

I'll hopefully have a little more time in the near-ish future to work on further improvements. I saw your typescript branch on your fork and am very interested. I (very halfheartedly) attempted that a few years back, but didn't get anywhere.

hucario commented 3 years ago

Is the code available on your fork?

Ah, yeah, it's at hucario/anesidora:vivaldi-webpanel

How do things look in the popout?

Experiencing a bug with the autoscroll where it scrolls the entire player instead of covers but it's completely fixable Here's a screenshot with the bug in effect and with it manually fixed: image

I went a head and merged lazy-loading and automatic packaging

Neat, that'll make public beta testing much easier, yeah

I saw your typescript branch on your fork and am very interested

Oh yeah, I've spent a bunch of time on that lately Spent a while porting every (known and documented) pandora API request and response to TS

image

Allows for this type of thing:

image

I'm eventually going to rewrite all of background.js and anesidora.js to be able to handle multiple accounts and apparently Pandora has a bookmarks functionality already so I don't need to deal with a lot more complexity so in conclusion I can add a favorites button

I'm also reworking the entirety of settings? And creating a first-start setup tour, here's what I've got so far

First Start

in conclusion this is going to take a while fortunately I have a lot more time than usual this week so I'm going to be working on it a lot

pvrs12 commented 3 years ago

fortunately I have a lot more time than usual this week so I'm going to be working on it a lot :turkey: same :turkey:

I'll be around to poke things/test if you want.

Just loaded up your branch, and yep, it'll definitely be a bit 😉 but that's nbd.

A starter Options page is a good idea, but I would recommend only showing it the first time someone clicks the "options" button, otherwise just go with the defaults as normal.

pvrs12 commented 3 years ago

I went ahead and created https://github.com/pvrs12/Anesidora/pull/99 based on your fork/branch. Once it's up-to-date with master (pretty easy merge, only 3 conflicts) it should do auto-builds for you whenever you push.

hucario commented 3 years ago

A starter Options page is a good idea, but I would recommend only showing it the first time someone clicks the "options" button, otherwise just go with the defaults as normal.

I was actually thinking on first install, but yeah that works too.

Minor note: I'm ditching old player support in this branch, it's just too much of a pain (especially as I'm reworking the background scripts so I'd have to rework the oldplayer scripts as well)

pvrs12 commented 3 years ago

I'm ditching old player support in this branch

That's fine, if someone wants that they can version lock

On Mon, Nov 22, 2021, 12:53 PM hucario @.***> wrote:

A starter Options page is a good idea, but I would recommend only showing it the first time someone clicks the "options" button, otherwise just go with the defaults as normal.

I was actually thinking on first install, but yeah that works too.

Minor note: I'm ditching old player support in this branch, it's just too much of a pain (especially as I'm reworking the background scripts so I'd have to rework the oldplayer scripts as well)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pvrs12/Anesidora/issues/93#issuecomment-975775995, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVCK4NIA7I6P5FBUUVKZ7LUNJ7RNANCNFSM5GEHTNIQ .

hucario commented 3 years ago

Update: Multi-account backend is working (as a start, for logins), and it automatically fetches bookmarks on login.

image

I also may have made a build.ts that compiles the typescript, copies the appropriate manifest, and copies all other files (non-.ts) from common.

lovelydumpling commented 3 years ago

Shame the old layout's being phased out. Makes sense that it'd happen and why it's happening, but I'll admit I've always preferred the smaller form factor of that player.

I suppose if I were to have a request, although I don't know how difficult it'd be to implement, perhaps a compact mode? With smaller font and no album art, so it's just the playhead, song/artist name, and controls? That ultimately would serve well to replace what I like most in the Old layout, although it's certainly not super important and I can make do without it.

Obviously I could version lock like mentioned but there's always the chance something will break again down the line like it did earlier this year and then folks won't really have a choice anymore anyway.

hucario commented 3 years ago

I suppose if I were to have a request, although I don't know how difficult it'd be to implement, perhaps a compact mode? With smaller font and no album art, so it's just the playhead, song/artist name, and controls? That ultimately would serve well to replace what I like most in the Old layout, although it's certainly not super important and I can make do without it.

Sure, I can absolutely do that. I'm already making the player very customizable so yeah that works too, I'll just add miniplayer support

lovelydumpling commented 3 years ago

You're my hero.

hucario commented 3 years ago

Alright, after far too long I have finished the bookmarks page. Mostly. I still need to add contextmenu support but I'm waiting until I implement that everywhere before I implement that here.

I've sort of redesigned the whole player, but the main gist is that each panel is created by a function and thus you can reorder them all you like. Changes based off of the config, and updates live with said config. Mildly amusingly, what took the most time was making it so it could update without having to rebuild the entire thing.

Anyways, here's Wonderwall a quick demonstration of that being a thing you can do, by changing the default album cover (image that shows when there isn't one):

https://user-images.githubusercontent.com/50851047/143328755-c458af34-ff3c-4b26-9a49-d07714cfa980.mp4

Here's a slightly more dramatic change, but it's the same system, which is the one the settings page will use:

Client sends "changeConfig" to backend with changed value
Backend saves that in localStorage
Backend sends "configChanged" to client(s)
Clients sift through the data and figure out what to do (ah, newValue.backgroundColor !== oldValue.backgroundColor, so run bPNodes.style.backgroundColor = newValue.backgroundColor)

https://user-images.githubusercontent.com/50851047/143331290-d388c01c-83da-424f-affe-57b15e0f1956.mp4

The current config schema Currently it only has the options for the Bookmarks pane, as that's what I've finished - but there'll be options per pane, and global options, and options for player behavior, and options for almost everything. ```ts const defaultConfig: AnesidoraConfig = { searchProvider: 'https://youtube.com/results?search_query=', defaultPane: "bookmarks", bookmarksPane: { uniqueOption: true }, theming: { popupWidth: "400px", popupHeight: "599px", cssVars: { tabSize: '2rem', fontFamily: "'Inter', sans-serif" }, customCSS: null, common: {}, bookmarks: { defaultAlbumCover: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mPkL5v/HwAD5QIlaA51ZwAAAABJRU5ErkJggg==', backgroundColor: 'rgba(0,0,0,1)', textColor: 'rgba(255,255,255,1)', padding: '0 5rem 5rem 5rem', mode: 'widesquares', groupMode: 'artist_first', combined: false, artistGroup: { gap: '1rem', columns: 4, imgSize: '5rem' }, songGroup: { gap: '1rem', columns: 3, imgSize: '4rem' }, combinedGroup: { gap: '1rem', columns: 3, imgSize: '4rem' } } }, forceSecure: true, accounts: [], activeAccount: null, playerPanes: [ "bookmarks", "controls", "stations", "accountSelection" ] } ```
hucario commented 3 years ago

Alright, I'm about 50% done with the controls section. image

hucario commented 2 years ago

Alright, mostly done with the UI code (for the controls pane at least), now I'm working on getting it functional; It's in a useable - if very buggy - state right now, so it's a few more hours of work and then that pane should be complete.

https://user-images.githubusercontent.com/50851047/145661404-7abcd1af-2446-459f-873e-108222179f46.mp4

hucario commented 2 years ago

Ad support :eyes: I haven't yet added config options for this, but when I'm creating the settings page I'll go through and do so.

Please note that this is ad support, not "force you to have ads on." I'm going down the Pandora certification checklist currently (https://developer.pandora.com/docs/certification-checklist/), but every single requirement (that changes behavior) will have an on/off toggle.

https://user-images.githubusercontent.com/50851047/148131752-55284a9a-c67e-4fb4-9e62-c03a83c34bf7.mp4

hucario commented 2 years ago

Station change indicators in history (don't mind the completely unstyled stations list) Still has a bug where it's slightly inaccurate, but I can fix it

https://user-images.githubusercontent.com/50851047/148150167-a50047fc-4d86-4d51-93a5-e06d5722f6c6.mp4

hucario commented 2 years ago

All changes have been pushed. I'm around done with the controls pane (pending more anesidorawide changes) so I'm working on the stations pane now. Latest commit:

feat: AD SUPPORT
feat(controls/background): stationChange events fully supported (good styling, IDs -> names)
feat: shift+{Left|Right}arrow selects specific feed items

fix: you can no longer tab to panes not visible
fix(controls): cover centering no longer offcenters entire pane

-- misc items --
feat(config): certification.autoSkipAds
feat(config): theming.smoothScroll
feat(config): more stations theming options

feat(background): mediaSession support for ads
feat(background): adTrackingTokens are used and registered

refactor: add TODOs for localization and documentation
refactor(pandora): add type for any PAPI method
refactor(config): Partial -> RecursivePartial when checking existing config

docs: add some explanations to code

fix: actually unique IDs for ads/songs/station changes
fix(controls): items not in covers feed are properly removed on station change
hucario commented 2 years ago

Sorry it's been a while - Life Happened™️. Currently working on the HTML templating engine - after that I need to:

hucario commented 2 years ago

I made a minor change to a commonly used function and now I have Problems image image

pvrs12 commented 2 years ago

Eek. That's a lot of problems...

I got Life ™️ as well.

All looking good so far though

hucario commented 2 years ago

Alright, finally working on this again - life has cleared up, free time is available. I've completely replaced the HTML templating engine with Liquid and the pages mechanism with Swiper. The templating engine is now if not a breeze to work with, workable and safe for end users to edit: image Meanwhile, Swiper is far more polished than the tabbing system we had prior, and allows mobile (note, NOT DESKTOP - video is emulating touch) users to swipe to access different tabs:

https://user-images.githubusercontent.com/50851047/182696925-f38dc601-1fa1-4977-8376-f0d89601828a.mp4

I need to commit this

hucario commented 1 year ago

Apologies for the long absence - I've wasted the last year(!?) or so going up the complexity stack and then realizing I had become the thing I swore to destroy.

A timeline:

So, a step back is needed. Anesidora, as far as I know, is not supposed to be an all-in-one Pandora replacement. It's supposed to be a station player. So I'm going to go for a v3 (publicly, actually v4 after v3 is scrapped) which isn't a massive undertaking and instead just makes the original v1/v2 better, without throwing out almost everything.

hucario commented 3 months ago

so I'm hesitant to share any progress here because I've done this before and posted progress and then utterly failed to follow through.

that said, I've been having steady free time again lately, and with a focus on "keep it small", I've done some design work:

Popup Window (LARGE, VERTICAL) Login Pane (LARGE, VERTICAL) Player Pane (mini)

And some design-to-ui work:

image

We'll see how it goes.

lovelydumpling commented 3 months ago

I'm glad you're still working on it here and there, I've been excited for the redesign 🙏

hucario commented 3 months ago

I've abandoned the multiple accounts idea, as that's not within scope. That said, I finished the update checker (this is actually working, not just a Figma design):

Current accounts page Checking... Successful Failed

Next up:

hucario commented 1 month ago

hey! been a bit.

done a lot, too:

all in all, I have not forgotten about this project and I will finish it. next up on the list:

anyways, it's a... bit... late, so I'm going to get some sleep. I'll be back with an update in probably another month or so

edit: did a quick review after hitting "send", and I'd like to note:

pvrs12 commented 1 month ago

Whoopsie! Wrong account! Don't doxx me!

Woah! Don't worry, I also haven't done anything on this for years! Nice work on all of this (as usual 😁). Adding a new library is no issue at all and the added metadata is really nice!

Whenever you do end up getting this onto GitHub (emailing zip files????) toss up a PR and I'll get it merged in & release a new version whenever you're ready.

Thanks again for coming back to this (even after I also left it sit)


From: Hugh @.> Sent: Friday, October 11, 2024 2:47:46 AM To: pvrs12/Anesidora @.> Cc: Patrick Vares @.>; Comment @.> Subject: Re: [pvrs12/Anesidora] Redesign v3 Thread (#93)

hey! been a bit.

done a lot, too:

all in all, I have not forgotten about this project and I will finish it. next up on the list:

anyways, it's a... bit... late, so I'm going to get some sleep. I'll be back with an update in probably another month or so

— Reply to this email directly, view it on GitHubhttps://github.com/pvrs12/Anesidora/issues/93#issuecomment-2406662885, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVCK4NFJWNX2OOINRZEUXTZ25YBFAVCNFSM6AAAAABMFNTU42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBWGY3DEOBYGU. You are receiving this because you commented.Message ID: @.***>

hucario commented 1 month ago

It's not a problem. To be honest, I felt a bit bad leaving it where it was - last time I worked on this, I was still learning web design. Several questionable design decisions were made.

(emailing zip files????)

Yeah. Due to commute and spread out regular appointments, on work days I usually stay in town until about 8pm, and I don't own a laptop - so I usually just work on this at the library. There aren't git clients on library machines, so I just send myself the zipped latest version as a poor man's version control. I'm home today, so I could do it now - but I want to continue working on actual coding, rather than uploading something that's not done anyways.

I'm currently working on the Settings page, and - looking over it - is there any reason to keep the option to not use HTTPS? I get that this was initially made in a time when HTTPS was fancy, but the only use I can think of is purposefully man-in-the-middling the extension, and a security researcher would know how to bypass HTTPS anyways.

Can you think of anything?

hucario commented 1 month ago

I was going to keep this a surprise, but I want to share my progress. I spent most of today's work (and yesterday's work) rebuilding the old player. Here's a before/after of the history screen (which is the only part I've finished): image image

It looks pretty much the same - on purpose. I'm aware there are probably users that like the look, and I know of at least one user that likes the compactness - so I'm just fixing it up while keeping the looks pretty much the same. "Pretty much" stretches a bit, though - see how the updated version's icons are completely sharp/smooth? That's because I spent about 4 hours remaking them in Inkscape as SVGs. But that's not the good part - sure, increased sharpness will help those with high-DPI displays, but the main thing is they're just as themable as the new player's icons: (An attempt from before I redid the icons:) image (After: ) image

I removed entirely the old JS, including the jQuery dep - turns out both the new and old player JS do the same thing, in different ways (shocker!) and with how I'm using templates in the new JS, I can just swap out the HTML/CSS and it works fine. I fully expect to have to add some seek/volume functionality to the new JS that lacks it, but that's alright.

That's where I'm currently at. This was actually a huge sidetrack from building Settings, but your honor, in my defense - I was planning to do this anyways, just later.

Anyways, can still use your opinion on whether to keep the HTTPS option (forceSecure) even settable to false.

hucario commented 1 month ago

Did some work trying to "upgrade" to Manifest v3. After some investigation, I've discovered it's mostly unfeasible.

This all taken into account, Manifest v3 on Firefox will not work. v3 on Chrome is possible, but would take a ton of refactoring. Given that Firefox doesn't require Manifest v3, we could "just" maintain a manifest v2 version for firefox and a manifest v3 version for chrome, but that's a large maintenance/complexity burden, and... why would we? Chrome already kicked us out.

lovelydumpling commented 1 month ago

Thanks Google, very cool as always. Definitely not evil! I'm happy I moved to and got reacquainted with Firefox when the writing was on the wall for this stuff.

pvrs12 commented 1 month ago

Looking great!

I removed entirely the old JS, including the jQuery dep

Amazing, jquery... sucks, so that's always good.

we could "just" maintain a manifest v2 version for firefox and a manifest v3 version for chrome, but that's a large maintenance/complexity burden, and... why would we

yeah, no real reason imo. We had 1 request for manifest v3, but it's not exactly a major mover. And since this got DMCA'd on the chrome store there's no reason to go out of our way to support it. Plus maybe it'll convince someone to move to firefox and reduce the global dependence on chromium

I'm currently working on the Settings page, and - looking over it - is there any reason to keep the option to not use HTTPS?

absolutely not. Idk if the API even supports plain HTTP. You're 100% that option is from the original addon years ago...

hucario commented 2 weeks ago

Great to hear, I'll remove that option then.

Currently working on the Settings page, and the backend thereof. Here's what I've got:

https://github.com/user-attachments/assets/1e544834-4950-4f44-b66d-46eb8af52db5

You'll note that it saves a different set of appearance settings for each player type. That's on purpose, and mostly because I like the light theme for the old player, but the dark theme for the new. This should be the simplest way of handling that - select which player you're editing, and you're on.

This took a surprisingly long time to figure out. Oh well.

Anyways, I'll be back in another week or so with hopefully the entire thing done.