feat: Add live status banner to ui5 serve#1439
Conversation
166413e to
f4284bb
Compare
d3xter666
left a comment
There was a problem hiding this comment.
LGTM
Tried different scenarios with file modifications, deleteions, new files and it seems to be working as expected
RandomByte
left a comment
There was a problem hiding this comment.
Some of these we could also tackle in a later follow-up. E.g. moving the implementation into the logger package (if we actually want to do that) is not a top priority for me and might come with extra work since we then need to account for multiple versions of the logger package being in use (which however is a good reason to couple the banner to the Serve-logger implementation)
4e310e6 to
c546338
Compare
|
Just out of curiosity, what would happen if I use cap-plugin-ui5 and serve multiple UI5 Apps at the same time using CAP? |
I would assume nothing would change. |
|
I've tested it locally on a bigger project where I use the workspace feature of UI5 CLI v5.0.0-alpha.5
❯ Local: http://localhost:8080
❯ Network: use --accept-remote-connections to expose
Project sapui5-dist-testsuite (application) v1.150.0-SNAPSHOT
Framework SAPUI5 1.150.0-SNAPSHOT
Status ● ready · Time elapsed: 14 sbut I get no indication that this doesn't match the workspace content. With the old log output, I saw the version of each project contained in the workspace sources: info graph:helpers:ui5Framework Using SAPUI5 version: 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.core via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.layout via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.unified via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.codeeditor via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.dt via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.suite via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.m via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.table via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.commons via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ndc via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.fl via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.mdc via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.tnt via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.ux3 via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.f via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.rta via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.support via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.integration via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.uxap via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.testrecorder via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project themelib_sap_belize via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project themelib_sap_fiori_3 via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project themelib_sap_horizon via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project themelib_sap_bluecrystal via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.webanalytics.core via local workspace to version 1.148.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.makit via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.me via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.export via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.richtexteditor via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.viz via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.suite.ui.microchart via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.vbm via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ca.ui via local workspace to version 1.148.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.rules.ui via local workspace to version 1.148.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.vtm via local workspace to version 1.148.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.zen.commons via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.zen.crosstab via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.uiext.inbox via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.sac.df via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.documentation via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.chart via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.insights via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ca.scfld.md via local workspace to version 1.148.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.comp via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.suite.ui.commons via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.vk via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.gantt via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.generic.template via local workspace to version 1.148.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.collaboration via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ui.generic.app via local workspace to version 1.148.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ovp via local workspace to version 1.149.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.zen.dsh via local workspace to version 1.150.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.ushell via local workspace to version 1.151.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.apf via local workspace to version 1.148.0-SNAPSHOT
info graph:helpers:ui5Framework Resolved project sap.suite.ui.generic.template via local workspace to version 1.151.0-SNAPSHOT
As I appreciate the focused information presented by the banner, I would not like to always switch it off, just to see those inconsistencies. But I also don't want to hunt ghost bugs that in reality are unnoticed source inconsistencies. Would it be possible to show an indicator for the inconsistencies, e.g. after the framework version, or is it too costly to determine this? UI5 CLI v5.0.0-alpha.5
❯ Local: http://localhost:8080
❯ Network: use --accept-remote-connections to expose
Project sapui5-dist-testsuite (application) v1.150.0-SNAPSHOT
Framework SAPUI5 1.150.0-SNAPSHOT (not consistent with workspace content)
Status ● ready · Time elapsed: 14 s |
|
@codeworrior thank you for testing it and bringing this up! The downloading status of the framework packages is something I still wanted to add, but I didn't think about the workspaces. Would you prefer to only have such an inconsistency check, or would you like to be able to get back the full list of packages that are resolved via the workspace? I feel like we might need an option to have a more verbose output in the banner, but far less compared to what As stated earlier, I would still like to merge this PR now, to unblock other work. I will address this in a follow-up PR. |
RandomByte
left a comment
There was a problem hiding this comment.
As agreed, let's merge this as is and continue working on the mentioned points in follow-up PRs

JIRA: CPOUI5FOUNDATION-1275