Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Refactor now playing #1241

Merged
merged 4 commits into from
Oct 4, 2020
Merged

Refactor now playing #1241

merged 4 commits into from
Oct 4, 2020

Conversation

Kamuso
Copy link
Contributor

@Kamuso Kamuso commented Sep 27, 2020

Had the wrong part of the overlay stickied last time. This should work properly.

Copy link

@nukooo nukooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what caused the options panel lag when this was first merged but since this PR only updates the CSS that bug should still be here.

Using a Set would be simpler and less error prone than a bit field. The banner board list uses this approach.

I'm not a fan of the stacked banners. Instead of changing the default look, why not design it to be easy to style the way you like with custom CSS?

switch (oldNowPlaying) {
case "false":
case "none":
localStorage.setItem("nowPlaying", "" + (0 ^ 0));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
localStorage.setItem("nowPlaying", "" + (0 ^ 0));
localStorage.setItem("nowPlaying", "0");

This is just confusing. Add a comment if you think the reader won't understand bit flags. Same with the others.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's unnecessary for that part, but I think particularly in specs.ts it makes it clearer how to add new options.

client/options/nowPlaying.ts Outdated Show resolved Hide resolved
client/options/nowPlaying.ts Outdated Show resolved Hide resolved
client/options/nowPlaying.ts Outdated Show resolved Hide resolved
break
let matched = false;
let s: string[] = [];
for (const i of enabled) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post name replacement should only happen when r/a/dio matches.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree. It currently happens if eden is the only enabled station, so I see no reason to exclude it now.

client/options/nowPlaying.ts Outdated Show resolved Hide resolved
client/ui/options.ts Outdated Show resolved Hide resolved
less/base.less Show resolved Hide resolved
@Kamuso
Copy link
Contributor Author

Kamuso commented Oct 3, 2020

Not sure what caused the options panel lag when this was first merged but since this PR only updates the CSS that bug should still be here.

I don't think that actually was lag, it was odd behaviour that just seemed like it. Should be fixed.

Using a Set would be simpler and less error prone than a bit field. The banner board list uses this approach.

Maybe. I'll admit I didn't look at how the board list worked before writing this, but logic mistakes aside I still quite like this way.

I'm not a fan of the stacked banners. Instead of changing the default look, why not design it to be easy to style the way you like with custom CSS?

Things already get quite tight with both stations enabled. If there were 3 or more enabled, it would be a cramped mess unless you had a massive monitor. The default should be usable. The new html layout does make it easy to put it back inline with custom css if you prefer it that way.

@bakape
Copy link
Owner

bakape commented Oct 4, 2020

Seems to be fixed. Merging.

@bakape bakape merged commit cc7ca51 into bakape:v6 Oct 4, 2020
@Kamuso Kamuso deleted the dev/v6-refactor branch October 5, 2020 17:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants