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 remaining scripts [Due 2018-07-01] #424

Closed
24 of 26 tasks
jiri-janousek opened this issue Apr 20, 2018 · 9 comments
Closed
24 of 26 tasks

Modernize remaining scripts [Due 2018-07-01] #424

jiri-janousek opened this issue Apr 20, 2018 · 9 comments
Assignees
Labels
type: quality Improves quality of the app or the user experience.

Comments

@jiri-janousek
Copy link
Member

jiri-janousek commented Apr 20, 2018


@jiri-janousek
Copy link
Member Author

jiri-janousek commented May 9, 2018

A draft of the ticket to be opened against individual scripts:

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 (#273). If it increases the revenue of the project, I'd love to share it with the script maintainers (#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.

@jiri-janousek jiri-janousek changed the title Update all scripts Modernize remaining scripts May 9, 2018
@jiri-janousek
Copy link
Member Author

Hello @a-m-s, could you review the draft above? Thanks :-)

@a-m-s
Copy link

a-m-s commented May 10, 2018

Looks fine to me. I presume one will no longer need ADK/master when this goes out? If that is required then you need to say so.

@jiri-janousek
Copy link
Member Author

ADK/master and ADK/stable are identical at present.

@jiri-janousek
Copy link
Member Author

Blocked by #436

@jiri-janousek jiri-janousek mentioned this issue May 10, 2018
8 tasks
@jiri-janousek jiri-janousek added blocked This ticket is blocked by another ticked, which needs to be resolved first. and removed blocked This ticket is blocked by another ticked, which needs to be resolved first. labels May 10, 2018
@jiri-janousek
Copy link
Member Author

6 new issues reported and linked in the very first post.

@jiri-janousek jiri-janousek changed the title Modernize remaining scripts Modernize remaining scripts [Due 2018-06-12] May 29, 2018
@jiri-janousek
Copy link
Member Author

My scripts lack web view snapshots.

@jiri-janousek jiri-janousek self-assigned this Jun 1, 2018
@jiri-janousek
Copy link
Member Author

Remaining scripts:

  • google-keep by Matthew Gabeler-Lee (fastcat) - not finished, not in stable anyway
  • jango by Stefano Bagnatica (thepisu) - tiliado/nuvola-app-jango#16 - adopt?
  • kexp by Michael Nye (thenyeguy) - tiliado/nuvola-app-kexp#4 - adopt?
  • logitech-media-server by Steffen Coenen (Tar-Dingens) - Modernize script nuvola-app-logitech-media-server#5 - remove from stable
  • tunein by Aurélien Jabot (ajabot) - tiliado/nuvola-app-tunein#5 - adopt?
  • yandex-music by Aleksey Zhidkov (d-r-q) - Modernize script nuvola-app-yandex-music#14 - maintainer does not have enough time, remove from stable, may be reintroduced later

@jiri-janousek jiri-janousek changed the title Modernize remaining scripts [Due 2018-06-12] Modernize remaining scripts [Due 2018-07-01] Jun 18, 2018
@jiri-janousek jiri-janousek added the release notes The work on the ticket is ready, but needs to be released and announced. label Jun 30, 2018
@jiri-janousek
Copy link
Member Author

  • jango, kexp, tune-in adopted by @fenryxo
  • yandex-music got necessary updates, the rest will follow when @d-r-q finds some time
  • logitech-media-server archived

@ghost ghost removed the release notes The work on the ticket is ready, but needs to be released and announced. label Jun 30, 2018
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
None yet
Development

No branches or pull requests

2 participants