Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize script #14

Open
7 of 11 tasks
jiri-janousek opened this issue May 29, 2018 · 5 comments
Open
7 of 11 tasks

Modernize script #14

jiri-janousek opened this issue May 29, 2018 · 5 comments
Assignees
Labels
type: quality Improves quality of the app or the user experience.
Projects

Comments

@jiri-janousek
Copy link
Member

jiri-janousek commented May 29, 2018

Blocked by: tiliado/nuvolasdk#9

Dear Maintainer,

There have been a lot of changes lately. I need you to review and modernize your script so that it keeps providing the best user experience possible. Eventually, I'd like to push some of them to Ubuntu software store as snap packages (tiliado/nuvolaplayer#273). If it increases the revenue of the project, I'd love to share it with the script maintainers (tiliado/nuvolaplayer#430).

I also need to know whether you still use this script and are willing to maintain it further. If you don't, I'll remove it from the stable repository until a new maintainer is found. No hard feelings though, you created & maintained it voluntarily and I'm glad for that.

Checklist

Use it to mark finished items.

  • .gitignore is up-to-date
  • README.md corresponds to the latest template
  • metadata.in.json uses two spaces for indentation and not trailing whitespace
  • integrate.js uses Standard JavaScript coding style
  • The Chromium-based backend is required and Flash is disabled unless it is really required.
  • The integration script works as expected with Nuvola API 4.11.
  • Custom actions were added if applicable.
  • Volume management is integrated if applicable.
  • A track progress bar is integrated if applicable.
  • Track rating is integrated if applicable.
  • The web view snapshot (src/webview.png) was added.

Getting started

Since Nuvola migrated from DEB/RPM packages to cross-distribution Flatpak packages, the development also occurs inside Flatpak sandbox. All you need is to install Flatpak and Nuvola App Developer Kit (ADK), then you can start hacking. You don't have to worry about installing/building of dependencies, all you need is at your disposal. Learn more about Nuvola ADK.

The way the web app scripts are launched has changed as well. All you need is to launch Nuvola ADK, cd to your project directory and run nuvolaruntime -D.

Semi-automatic changes

  • I tried hard to make some changes automatic. Install Nuvola ADK and run nuvolasdk convert-project. If there are any issues, please report them.
  • Update .gitignore: nuvolasdk convert-project should have fixed that.
  • Update README.md: nuvolasdk convert-project will provide you with the new template (template--README.md) and a difference between it and your README.md (template--README.md.diff). Update your README.md to match the template - I will probably copy most of the template content and keep only the Copyright section from your current README.md.
  • Convert metadata.in.json: The metadata.in.json now uses two spaces for indentation and no trailing whitespace. nuvolasdk convert-project should have fixed that.
  • Convert integrate.js: Nuvola adopted Standard JavaScript coding style. This allows us to automatically check the scripts for coding errors and mistakes. nuvolasdk convert-project runs standard --fix, which tries to convert your integrate.js.
    • If you see errors regarding tab characters, replace tabs with spaces in a text editor and run standard --fix again.
    • If there is something ugly, please fix that manually. It sometimes creates long if-else single lines.
    • If there are other errors, please fix them and run standard --fix again and again...
  • Commit the changes before moving to the next section.

Chromium-based backend and HTML5 playback without Flash plugin

A long-time effort to get rid of Flash plugin may finally succeed. Nuvola had to switch a web rendering engine from WebKitGTK+ to Chromium Embedded Framework. Many scripts have already been ported, it's time to port the rest.

  • Add/set "requirements": "Chromium[65] Codec[MP3] Feature[MSE]" to metadata.in.json, run ./configure, and then launch your script with nuvolaruntime. Remember that you need to run ./configure whenever you changes metadata.in.json.
  • If there are any JavaScript errors or the website fails to load, let me know to help you.
  • Note that some synchronous API calls are not available in the Chromium-based backend for technical reasons. Use async variant instead - see Nuvola 4.8 API changelog.
  • Check whether audio playback works right away.
  • If your web app complains about missing Flash plugin, use "requirements": "Chromium[65] Codec[MP3] Feature[MSE] Feature[Flash]" and test again.

Update integration script

  • Set '"api_major": "4", "api_minor": "11" in metadata.in.json.
  • Look at NuvolaKit JavaScript API changelog - a few useful functions were added.
  • Make sure that your script and basic integration features (player metadata) work as expected.

Add new features

Several new features have been added to Nuvola. Look at them whether they apply to your web app.

Add web view snapshot

  • Provide a representative snapshot of web view of your script to be used for screenshots. See Provide per-app screenshots for AppData nuvolasdk#5 for the reasoning behind that.
  • First, navigate to a proper page.
  • Enable Developer tools in Preferences and open Developer sidebar.
  • Try to remove annoying elements (ads, nag banners):
    web_view_snapshot_remove_ads
  • Open Web View sidebar, set dimensions to 1080×600 and click Resize web view. If is necessary, e.g. because of the breakpoints of responsive layout of the page, you can choose narrower dimensions.
  • Then take a snapshot of the web view and save it as src/webview.png.
  • Run ./configure; make all and look at the resulting screenshots in the screenshots directory.
  • The base screenshot still says "Deezer" but that will change to "Nuvola Player" or something like that in the final base screenshot. Also, the Unity base screenshot has an extra scrollbar, that will be fixed as well.
@d-r-q
Copy link
Contributor

d-r-q commented May 31, 2018

@fenryxo I use the script, but now I do not have enough time to implement this amount of changes. I think that I will not be able to implement this changes untill September.

@jiri-janousek
Copy link
Member Author

Thanks for letting me know, @d-r-q. Could you at least implement "Semi-automatic changes" (that should be easy) and "Chromium-based backend and HTML5 playback without Flash plugin" (so the script won't stop working when WebKit backend is disabled) in the near future?

@d-r-q
Copy link
Contributor

d-r-q commented Jun 1, 2018

Ok

@jiri-janousek jiri-janousek added the blocked This ticket is blocked by another ticked, which needs to be resolved first. label Jun 12, 2018
@jiri-janousek
Copy link
Member Author

Blocked by tiliado/nuvolasdk#9.

@jiri-janousek
Copy link
Member Author

Hello @d-r-q. The freeze for Nuvola 4.12 is scheduled for July 1st (as per tiliado/nuvolaplayer#431). I hope we solve tiliado/nuvolasdk#9 and you manage to do "Semi-automatic changes", "Chromium-based backend and HTML5 playback without Flash plugin" and "Add web view snapshot" within that time period. If not, your script will be removed from the stable channel but may be introduced anytime later on (even in between Nuvola releases).

d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
…ut Flash plugin

Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
…ut Flash plugin

Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
…ut Flash plugin

Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
…ut Flash plugin

Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
d-r-q pushed a commit to d-r-q/nuvola-app-yandex-music that referenced this issue Jun 16, 2018
Signed-off-by: Aleksey Zhidkov <aleksey.zhidkov@gmail.com>
jiri-janousek added a commit that referenced this issue Jun 17, 2018
Minimal subset of #14 implemented:
- Semi-automatic changes
- Chromium-based backend and HTML5 playback without Flash plugin
- Add web view snapshot

- Issue: #14
- Reviewed by: Jiří Janoušek <janousek.jiri@gmail.com>
- Pull request: #15
@jiri-janousek jiri-janousek added type: quality Improves quality of the app or the user experience. and removed blocked This ticket is blocked by another ticked, which needs to be resolved first. quality labels Jun 17, 2018
@jiri-janousek jiri-janousek added the stalled Some work has been done but nobody is working on finishing this ticket. label Jun 18, 2018
@jiri-janousek jiri-janousek added status: backlog and removed stalled Some work has been done but nobody is working on finishing this ticket. labels Jan 18, 2019
@jiri-janousek jiri-janousek added this to Backlog in Nuvola Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: quality Improves quality of the app or the user experience.
Projects
Nuvola
  
Backlog
Development

No branches or pull requests

2 participants