magento2-upgrade-gui icon indicating copy to clipboard operation
magento2-upgrade-gui copied to clipboard

Add support in the GUI for new output types

Open peterjaap opened this issue 3 years ago • 13 comments
trafficstars

The amazing @convenient added a few output types to the Ampersand tool (see commit);

    const TYPE_QUEUE_CONSUMER_ADDED = 'Queue consumer added';
    const TYPE_QUEUE_CONSUMER_REMOVED = 'Queue consumer removed';
    const TYPE_QUEUE_CONSUMER_CHANGED = 'Queue consumer changed';
    const TYPE_DB_SCHEMA_ADDED = 'DB schema added';
    const TYPE_DB_SCHEMA_CHANGED = 'DB schema changed';
    const TYPE_DB_SCHEMA_REMOVED = 'DB schema removed';

Right now, this info is nowhere to be seen in the GUI, so we need to add it.

I'm terrible at UI, so maybe someone has an idea of where to show it. My thought would be to show an Info button on this page somewhere:

image

Maybe with an indicator of how many INFO notices there are. When clicking on it, you'll go to a screen that shows all the warnings?

Hint; https://github.com/elgentos/magento2-upgrade-gui/blob/26cfa8040568669a69b4b59625fb41cede9444ce/src/background.js#L163

peterjaap avatar Oct 14 '22 07:10 peterjaap

@peterjaap DB schema are still WIP and subject to change 🙃

convenient avatar Oct 14 '22 08:10 convenient

Not WIP anymore - docs here https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/blob/master/docs/CHECKS_AVAILABLE.md :)

peterjaap avatar Nov 19 '22 09:11 peterjaap

Checks are listed in this file https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/blob/5ba7d71bb834b72086ed5b727a6ec39bb6af41cc/src/Ampersand/PatchHelper/Checks.php#L7-L16

Queue consumers are always INFO level

Db schema can be both INFO and WARN levels

https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/blob/5ba7d71bb834b72086ed5b727a6ec39bb6af41cc/src/Ampersand/PatchHelper/Checks/DbSchemaXml.php#L32

https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/blob/5ba7d71bb834b72086ed5b727a6ec39bb6af41cc/src/Ampersand/PatchHelper/Checks/DbSchemaXml.php#L112

convenient avatar Nov 19 '22 09:11 convenient

Some work being done in https://github.com/elgentos/magento2-upgrade-gui/tree/info-notices

peterjaap avatar Nov 19 '22 10:11 peterjaap

Ok I've merged the work I've done into 1.3.1.

Notable changes;

  • Added a button INFO notices (X) (if X > 0) where X is the number of info notices
  • Upgraded Electron from v9 to v21
  • Upgraded electron-store
  • This upgrade fixed the developer console not showing up under Ubuntu 22.04
  • Installed Vue Development tools in development mode
  • Split the results.json file into warnings.json and infoNotices.json

The INFO notices button doesn't do anything yet except show an alert box saying it's not implemented yet;

image

Next step is to create an actual screen with the notices displayed.

peterjaap avatar Nov 19 '22 11:11 peterjaap

I hope that is related to this issue:

I see db_schema.xml output, but when I open it, the right site of the view does not load the db_schema.xml - instead the previously selected file stays at the right side.

Console prints:

vue.runtime.esm.js:1897 Error: The language "undefined" has no grammar.
    at highlight (prism-core.js:663:11)
    at o.customFileContentHighlighter (Editor.vue:215:14)
    at o.content (prismeditor.esm.js:124:25)
    at ir.get (vue.runtime.esm.js:4495:25)
    at ir.evaluate (vue.runtime.esm.js:4597:21)
    at o.content (vue.runtime.esm.js:4851:17)
    at o.render (prismeditor.esm.js:555:25)
    at e._render (vue.runtime.esm.js:3569:22)
    at o.r (vue.runtime.esm.js:4081:21)
    at ir.get (vue.runtime.esm.js:4495:25)

amenk avatar Nov 29 '22 11:11 amenk

Where do you see the db_schema.xml output? It shouldn't show up in the GUI anywhere at this point. Could you share a screenshot?

peterjaap avatar Nov 29 '22 19:11 peterjaap

Along with the other lines in the dropdown at the top... Can share a screenshot tomorrow

amenk avatar Nov 29 '22 19:11 amenk

image

Found it. Fix incoming.

peterjaap avatar Nov 29 '22 19:11 peterjaap

Still having this with 1.3.2

image

same JS error

amenk avatar Dec 02 '22 12:12 amenk

@amenk fixed in 1.3.4

peterjaap avatar Dec 09 '22 15:12 peterjaap

@amenk amended in 1.3.5. I previously filtered out the "DB changed" WARN notices, but I re-added them and show a notice on the right hand side why no file is shown for "DB changed added" WARN notices;

No file found in previous install - this is a new file. See the diff on the left hand side to see the actual changes.

peterjaap avatar Dec 09 '22 15:12 peterjaap

Works well :-)

amenk avatar Dec 09 '22 16:12 amenk