Skip to content

D-Installer UI as a Cockpit module#127

Merged
imobachgs merged 32 commits intomasterfrom
cockpit-module
Apr 11, 2022
Merged

D-Installer UI as a Cockpit module#127
imobachgs merged 32 commits intomasterfrom
cockpit-module

Conversation

@imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Apr 11, 2022

Once we decided to rely on Cockpit, it makes sense to develop this UI as a regular module. Cockpit allows to:

So we do not find any limitation that justifies building the web UI in a different way.

This PR is based on Cockpit's starter kit, although we decided to drop some parts and introduce some small changes.

Relevant changes

  • src/lib is reserved now for Cockpit files. Our client has been moved to src/client.
  • The code has been adapted to the new ESLint rules.
  • While adapting the code to ESLint rules, we found out that we were using async functions in useEffect in the wrong way.
  • We renamed the package to cockpit-d-installer.

Pending

  • There are some problems with the styles, although most of them are already solved.
  • Development documentation must be updated.
  • Move components to src/components. On a different PR.
  • Some clean-up is still needed, as we rely on Cockpit for authentication. On a different PR (see auth-clean-up branch).

imobachgs and others added 21 commits April 8, 2022 21:07
* Based on commit b2379f78.
* Disable styles to make it build.
* Remove the frontend-linter job, as the linter runs when building the
  application.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2147404312

  • 0 of 33 (100.0%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+5.08%) to 87.065%

Totals Coverage Status
Change from base Build 2098746297: 5.08%
Covered Lines: 439
Relevant Lines: 489

💛 - Coveralls

@coveralls
Copy link

coveralls commented Apr 11, 2022

Pull Request Test Coverage Report for Build 2148228861

  • 33 of 33 (100.0%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 82.038%

Totals Coverage Status
Change from base Build 2098746297: 0.05%
Covered Lines: 1033
Relevant Lines: 1250

💛 - Coveralls

@imobachgs imobachgs marked this pull request as ready for review April 11, 2022 11:00
Copy link
Contributor

@joseivanlopez joseivanlopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dgdavid
Copy link
Contributor

dgdavid commented Apr 12, 2022

  • There are some problems with the styles, although most of them are already solved.

Just for the record, problems with fonts were fixed at #131

dgdavid added a commit that referenced this pull request Nov 15, 2023
Another boring PR for keeping dependencies up-to-date via `npm update` and `npm install @package/name@latest`.  No more `--lockfile-version 2`  because [OBS already supports version 3](https://github.com/openSUSE/obs-service-node_modules/blob/2153192f0baf8453c12bacf7b872c0c786ed645f/node_modules.py#L342-L343) as we realized at #843

Please, note that this time we manage to get rid of some dependencies which were there because cockpit-starter-kit (see #127) but actually not needed anymore. In fact, they are no longer dependencies of starter-kit. Namely, 

* [core-js](https://github.com/zloirock/core-js)
  - As a weird side effect, few tests were _fixed_ to wait a bit for the expected content. Some black magic around _Promise.resolve_, I guess. Honestly, I didn't dig too further on it since waiting for the content is somehow _expected_.
*  [stdio](https://github.com/sgmonda/stdio)
* [sizzle](https://www.npmjs.com/package/sizzle)

Apart from these, [regenerator-runtime](https://github.com/facebook/regenerator) was dropped too because 

> It was added more than a year ago in the context of "Adapt React
> components to the Starter Kit". But probably is no longer needed since
> async functions, ES6 generators, and `yield` JavaScript operator have
> broad support among major browsers.

---

* [web] Update dependencies via `npm update`

* [web] Update icons packages to their latest version

* [web] Update Patternfly libraries to latest version

* [web] Drop core-js dependency

    It was added because of cockpit-starter-kit[1] but they already dropped
    it[2] because
    
    > starter-kit does not use it directly, and none of our derived projects
    > have it.
    
    Thus, in principle it does not make sense to keep it as Agama
dependency.
    
    As weird side-effect, a few test were fixed to "waitFor" the expeced
content.
    
    [1] 55c75c3
    [2] cockpit-project/starter-kit@67c1c06

* [web] Update fast-sort to its latest version

* [web] Update ippadr.js to its latest version

* [web] Drop regenerator-runtime dependency

    It[1] was added more than a year ago[2] in the context of "Adapt React
    components to the Starter Kit". But probably is no longer needed since
    async functions, ES6 generators, and `yield` JavaScript operator have
    broad support among major browsers.
    
    [1] https://github.com/facebook/regenerator
    [2] 55c75c3

* [web] Update sprintf-js to the latest version

* [web] Update typedoc and related dependencies

* [web] Update webpack and related dependencies

* [web] Update stylint and related dependencies

* [web] Update @babel and related dependencies

* [web] Update cspell dev dependencies

* [web] More babel dev dependencies updates

* [web] Update eslint and eslint-config dependencies

* [web] Update eslint-plugin dependencies

* [web] Update jest dependencies

* [web] Update jsdoc dependency

* [web] Update sass dependencies

* [web] Update terser-webpack-plugin

* [web] Drop stdio dev dependency

    It was there because cockpit-starter-kit, which dropped it a year
ago[1][2]

    [1] cockpit-project/starter-kit#590
    [2] cockpit-project/starter-kit@6e1fd84

* [web] Drop sizzle dev dependency

    Which came from cockpit-starter-kit. It was dropped there few months
    ago, in Jun 2023[1]
    
    [1] cockpit-project/starter-kit@1e46595

* [web] Update qunit dev dependency to latest version

* [web] Update mini-css-extract-plugin

* [web] Update ajv dev dependency

* [web] Update @testing-library dependencies

* [web] Update @typescript-eslint dependencies

* [web] Update @types/jest

* [web] Adapt FileViewer test

For waiting for the expected content

* [web] Fix NetworkPage test

    Remove a leftover it.only and make examples wait a bit for the expected
content.

* [web] Little improvement in Sidebar test

* [web] Update ProductPage test

For waiting a bit to find the expected content
dgdavid added a commit that referenced this pull request Sep 16, 2024
Which comes from the cockpit-starter-kit (see
#127) but it is actually not
needed since Agama does not use flowtype's annotation.

What is more, it isn't a cockpit-starter-kit dependency anymoer, see
cockpit-project/starter-kit@ab04f35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments