Wa-automate-nodejs: Feature: ui improvements for non headless puppeteer

Created on 20 Oct 2020  Â·  10Comments  Â·  Source: open-wa/wa-automate-nodejs

Feature Suggestions

This is my suggestion for non headless puppeteer

Dark Mode Session

Allow localStorage.theme to be saved on the session
I always turning on Dark Mode manually everytime i continue my session.

Auto Resize InnerWindow

The puppeteer innerWindow seems to have fixed innerWindow size (similar issue https://github.com/puppeteer/puppeteer/issues/3688)

Most helpful comment

@github-actions run


âš¡ Release! âš¡

(async () => {
function exec(cmd) {
  console.log(execSync(cmd).toString());
}

// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";

exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);

//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();

    await postComment(result);

//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
  })();

All 10 comments

regarding the second point can you add this to your config:

{
    ...
    defaultViewport: null,
    ...
}

as you can see here: https://github.com/open-wa/wa-automate-nodejs/blob/f53e6ae7c92fe5a95b574bb7362eb0d508bd6b41/src/controllers/browser.ts#L160

config is spread into the puppeteer launch options

Edit: nvm that doesn't work. Can you try to figure out which pptr configs work please.

@github-actions run


âš¡ Release! âš¡

(async () => {
function exec(cmd) {
  console.log(execSync(cmd).toString());
}

// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";

exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);

//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();

    await postComment(result);

//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
  })();

Changelog

🚀 Release 3.0.3 (2020-10-20)

  • Release 3.0.3 5ea83ee
  • darkMode is now GA #967 32c8fcf
  • deleteSessionDataOnLogout set to false by default. onStateChanged no longer detects logout b68b20c
  • possible fix for #968 1a3b374
  • possible fix for #962 7612d20

Regarding dark mode, you can just use this now: https://open-wa.github.io/wa-automate-nodejs/classes/client.html#darkmode

@github-actions run


âš¡ Release! âš¡

(async () => {
function exec(cmd) {
  console.log(execSync(cmd).toString());
}

// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";

exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);

//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();

    await postComment(result);

//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
  })();

Changelog

🚀 Release 3.0.4 (2020-10-20)

  • Release 3.0.4 76593e4
  • config: allow setting defaultViewport to null for a resizable window #967 7e81752

regarding the second point can you add this to your config:

{
  ...
    defaultViewport: null,
  ...
}

as you can see here:

https://github.com/open-wa/wa-automate-nodejs/blob/f53e6ae7c92fe5a95b574bb7362eb0d508bd6b41/src/controllers/browser.ts#L160

config is spread into the puppeteer launch options

Edit: nvm that doesn't work. Can you try to figure out which pptr configs work please.

@nurutomo This should work now. Report back if working for you thanks

regarding the second point can you add this to your config:

{
    ...
    defaultViewport: null,
    ...
}

as you can see here:
https://github.com/open-wa/wa-automate-nodejs/blob/f53e6ae7c92fe5a95b574bb7362eb0d508bd6b41/src/controllers/browser.ts#L160

config is spread into the puppeteer launch options
Edit: nvm that doesn't work. Can you try to figure out which pptr configs work please.

@Nurutomo This should work now. Report back if working for you thanks

The config works. but, the dark mode Wallpaper doesn't load. Just plain dark-gray color
image
and also this option doesn't change
image

@Nurutomo it's not only dark gray, I can see the doodles there. If you want to change the background colour you can use this https://open-wa.github.io/wa-automate-nodejs/classes/client.html#setchatbackgroundcolourhex

That feature requires INSIDERS LICENSE KEY , which is i doesn't have one.
nvm 'bout the wallpaper

Was this page helpful?
0 / 5 - 0 ratings

Related issues

feliperaul picture feliperaul  Â·  5Comments

mrbarnk picture mrbarnk  Â·  5Comments

sandro-salles picture sandro-salles  Â·  4Comments

arisros picture arisros  Â·  4Comments

renato-macedo picture renato-macedo  Â·  6Comments