Samillion / ModernZ

A sleek and modern OSC for mpv designed to enhance functionality by adding more features, all while preserving the core standards of mpv's OSC.
GNU Lesser General Public License v2.1
26 stars 3 forks source link

Some ideas to improve the project #91

Open Xurdejl opened 2 days ago

Xurdejl commented 2 days ago

Hi,

I've thought of a few ideas that I think could help improve the project. Since this is a rewrite, I think it's a good opportunity to establish a solid structure that could serve as a foundation for future forks or contributors.

  1. Establishing a clear vision

    As a ModernZ user, I often make changes but hesitate to submit a PR because I'm unsure if they align with the project goal. A clear project vision would be nice for contributors to know what to focus on.

  2. Implement conventions

    Commit message guidelines: Adopting a format like Conventional Commits to make it easier to understand the history and purpose of changes.

    Branching strategy: Clearly defining how feature and fix branches should be named and managed can simplify collaboration.

  3. release drafter

    I came across release drafter and think it could be handy for automating release notes based on commits. It’d keep users updated with clean changelogs.

Let me know what you think about these ideas.

Samillion commented 2 days ago

As a ModernZ user, I often make changes but hesitate to submit a PR because I'm unsure if they align with the project goal. A clear project vision would be nice for contributors to know what to focus on.

Answering you specifically, never hesitate. I've already seen your work and have a glimpse of what you think is practical. Worst case scenario is that your PR will be a discussion, but your ideas and implementations have been solid.

To answer generally for all contributors, the goal is to establish a stable OSC alternative to stock with a modern look. Practical use is the key vision. Niche features or additions like https://github.com/Samillion/ModernZ/issues/84 can be considered, but they're definitely not the main priority.

At least while the project is still fixing very old bugs from previous forks or origin.

Main project goals:

ModernZ is trying to be in a middle area between stock OSC and a project like uosc. One is too simple, the other is too complicated.

One of the first things that happened in ModernZ was to re-base on stock osc and integrate features that mpv already has, which eliminated a ton of bloat from the code. (example: https://github.com/Samillion/ModernZ/commit/cbce79c9cf378e19dc1417304e2d6fc0bc69f282)

In essence, we want to be better than stock OSC, but we don't want to do everything. That is why for example I loved that you integrated locale as extras, and the same thing was done for the pause indicator. If it's useful, but not necessary to the OSC, it should be in extras or an independent script. Modular methodology.

Commit message guidelines: Adopting a format like Conventional Commits to make it easier to understand the history and purpose of changes.

I absolutely agree. I was hectic in the beginning, but recently I've been applying the same commit format as mpv.

Branching strategy: Clearly defining how feature and fix branches should be named and managed can simplify collaboration.

I honestly haven't thought of this much, what I've been doing is: if it's for testing, any random (yet relevant naming scheme) to branch would suffice, if it's a branch point that I know might be merged, I implement a clear naming related to the commit message with the prefix dev_.

Which I guess we can utilize as commit conventions, ie: dev_, fix_, feat_

I came across release drafter and think it could be handy for automating release notes based on commits. It’d keep users updated with clean changelogs.

That is wonderful, and I agree, it would make things a lot smoother and seamless. Not just for users, but for maintainers and contributors as well.

Thank you so much for your detailed input. If you have any ideas of something that you'd think should be implemented, please share it and never hesitate.

Xurdejl commented 1 day ago

tbh, I’m not that confident in my lua skills yet. I mostly know the basics because of javascript, and I often find myself trying things until they work. That said, I’m always happy to help however I can, whether it’s with ideas, testing, docs, or anything else you might need for the project.

Here are some changes I’ve made to my version of ModernZ that you might find interesting:

If any of these features sound useful, I’d be glad to discuss them further or help implement them. And thanks for the detailed response

Samillion commented 1 day ago

I’m always happy to help however I can, whether it’s with ideas, testing, docs, or anything else you might need for the project.

Much appreciated, your ideas and implementations have definitely been very helpful.

Picture-in-Picture mode for "On Top": I modified the pin button to act as a picture-in-picture mode. It not only pins the window on top, but also resizes it to the bottom corner of the screen, which I find useful for multitasking.

Great idea, extremely useful for single screen use. We could implement it as a mode pip, pin for the ontop button, to control behavior, in order to satisfy both scenarios. (ie: pip in same screen, or pin in another screen or wherever)

Updated icon font: Since the original ModernX was inspired by the Windows 10 Movies & TV app, I decided to switch to fluent icons, because it felt like a natural progression. Currently, ModernZ uses an older version of Material Icons. In 2022 Google introduced Material Symbols, which is the current maintained set.

My god, you have read my mind. That is wonderful! I cannot wait to see it. If you do a PR on this, please include a font credit to yourself in "History & Credits". In fact, you should include one for the locales as well. As both are major features within the osc.

Speaking of locales, after I cleanup bugs and code, I plan (try) on turning the locales into JSON file to be used within script-opts. For the sake of staying true to locale standards and to avoid loading them as a script automatically in mpv's backend.

Moved playlist button to title bar: I relocated the playlist button to the window’s title bar, just to the left of the title. Many modern players follow this design, and I think it visually balances the interface by not clustering all buttons in the bottom row.

Indeed, I think I've seen it in MPV Easy and even some frontends like Celluloid. So this makes the playlist button visible in --no-border or --top-bar=no only?

Back button for stopping playback: I recently thought of adding a back button in the left corner of the title bar, next to the playlist button. This button stops playback and returns to idle mode.

That sounds very interesting, it actually behaves like a panic button as well, which I'm sure many would find useful.

Xurdejl commented 1 day ago

Great idea, extremely useful for single screen use. We could implement it as a mode pip, pin for the ontop button, to control behavior, in order to satisfy both scenarios. (ie: pip in same screen, or pin in another screen or wherever)

Just to clarify, it sounds like you’re suggesting keeping both the current "On Top" behaviour and adding the new picture-in-picture functionality as a user option, so they can choose between the two modes?


My god, you have read my mind. That is wonderful! I cannot wait to see it. If you do a PR on this

In my initial comment, I mentioned both Fluent Icons and Material Symbols, and I’m not sure which you prefer for the final look. To clarify, I didn’t create the .ttf file myself. I used Photoshop to edit it, by adding the missing jump icons for 5 and 30 seconds. I also included a few filled icon variants from Microsoft’s Figma library.


Speaking of locales, after I cleanup bugs and code, I plan (try) on turning the locales into JSON file to be used within script-opts. For the sake of staying true to locale standards and to avoid loading them as a script automatically in mpv's backend.

Moving to JSON for locales is a great idea. After implementing the current approach, I realized JSON would be a better way to do it.


Indeed, I think I've seen it in MPV Easy and even some frontends like Celluloid. So this makes the playlist button visible in --no-border or --top-bar=no only?

I think it might be best to keep the playlist button visible regardless of --no-border or --top-bar=no, so users can have the button without needing to disable the border.

Samillion commented 1 day ago

Just to clarify, it sounds like you’re suggesting keeping both the current "On Top" behaviour and adding the new picture-in-picture functionality as a user option, so they can choose between the two modes?

Wouldn't that be the best scenario? For example, on the PC where I do most of my work, I have dual screens. If I watch something, I tend to to do it like this:

image

Which gives me more flexibility when I pin in the second screen.

However, on my other PCs, I have a single screen, so a pip mode would be best in that scenario.

In my initial comment, I mentioned both Fluent Icons and Material Symbols, and I’m not sure which you prefer for the final look.

I meant I was excited to see your work with the Fluent Icons. I was sneaky 😝 and looked over your mpv conf repo and noticed the work with the font and icons. Beautiful.

I didn’t create the .ttf file myself. I used Photoshop to edit it, by adding the missing jump icons for 5 and 30 seconds. I also included a few filled icon variants from Microsoft’s Figma library.

Still deserve credit for the effort, to be honest. A font origin credit to be included would solve this, so that everyone's effort are acknowledged.

Moving to JSON for locales is a great idea. After implementing the current approach, I realized JSON would be a better way to do it.

To be honest, your PR is what made me think about the possibility of JSON. Before your PR I didn't even think of integrating it further, as you saw. 😅

I think it might be best to keep the playlist button visible regardless of --no-border or --top-bar=no, so users can have the button without needing to disable the border.

That would be very interesting. I'd love to see it in action, as I might be confused on how this idea is implemented.

ThousandDemonDaggers commented 1 day ago

Will this project follows and implement features and fixes added to ModernX? For example the new 0.3.8 release.

Samillion commented 1 day ago

Will this project follows and implement features and fixes added to ModernX? For example the new 0.3.8 release.

The dynamic time feature is by @Xurdejl which he implemented in a PR to both ModernZ and ModernX.

All ModernX (and Modern in general) features are already added. ModernZ is a project to revive the modern origin, so that means ModernZ will have less bugs and more customization than other forks. Even the download button was implemented recently, and will be released in a couple of days. (Can use it in this version)

The only features that will not be added are: Youtube description, comments and likes. Reason being those are niche features that should be used as independent scripts and not tied to the OSC, for maintenance sake. Similar to our Pause Indicator and Auto-ytdlFormat in Extras.

Xurdejl commented 22 hours ago

Wouldn't that be the best scenario? For example, on the PC where I do most of my work, I have dual screens. If I watch something, I tend to to do it like this:

True, I didn't think about that because I only have one monitor.


I think it might be best to keep the playlist button visible regardless of --no-border or --top-bar=no, so users can have the button without needing to disable the border.

That would be very interesting. I'd love to see it in action, as I might be confused on how this idea is implemented.

I meant to keep the icon in the top left corner, not necessarily within the title bar like in no-border.