Skip to content

web: add support for storage config#1704

Merged
joseivanlopez merged 39 commits intostorage-config-uifrom
show-config
Oct 30, 2024
Merged

web: add support for storage config#1704
joseivanlopez merged 39 commits intostorage-config-uifrom
show-config

Conversation

@joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Oct 28, 2024

  • Extract storage schema to a separate schema file.
  • Auto-generate ts config types from storage schema (json2ts schema.json > types.ts).
  • Add react hooks to work with config.
  • Merge master to keep feature branch in sync.

Because at this moment it does not provide any useful information for
the user. Moreover, most probably a user in front of the Agama UI is
aware of what Agama is, especially now that it has its own documentation
site.
A step forward to simplify or at least improve how the application is
laid out with full header and sidebar or not depending on the route or
the action the installer is displaying or triggering.

There are a lot of changes here and there, but basically what this
commit does is

* Drop SimpleLayout component
* Rename Main to Layout and add two convenience predefined variants:
  Full and Plain.
* Adapt layout/Header for displaying more or less things depending on
  props, sent via Layout component.
* Remove the installer options "cog button" in favor of a dropdown in
  the header right corner and move the installer options as an element
  inside. Such a dropdown will hold the "Download logs" actions in the
  short term.
* Adapt needed parts to accommodate above changes.
Where it is hold by the "options menu/dropdown". That way, such an
action is now available always, no matter if the application sidebar has
been mounted or not.

Somehow, it moves forward the refactor started at
#1694.
It implies to remove it, and its ad hoc section, from the Overview page.

As an intermediate step, it also change the presentation of the Overview
page, which only uses the "two columns" layout if there is any issue to
render. Not polished in details because it is subject to future changes
to make the issues list always accessible/visible from any other place.
They stop working by the lack of `useAllIssues` mock after moving the
core/InstallaButton to the core/Header and start using such and issues
query to decide if the button is displayed or not.
For adding some space between the action and the viewport edges, without
investing too much time on it because its final appeareance and location
is not decided yet.
More specifically, the .js or .jsx files touched in previous commits for
#1690.

Apart from the expected changes to make the migration possible, there
were two changes that worth a remark:

  * Make optional `description` and `icon` for the software/Product
    type.
  * Add the `custom.d.ts` file and make tsconfig.json file aware of it
    in order to avoid TypeScript complaints in the src/layout/Icon.ts
    file because missing types in the icons library. To know more read
    https://webpack.js.org/guides/typescript/#importing-other-assets
As a counterpart of the InstallButton, an IssuesLink is displayed when
the installation is not possible to make the user aware why the
InstallButton is not there.

This is a temporary navigation link to the overview page that, most
probably, will be replaced by a toggler for a Notification Drawer
https://www.patternfly.org/components/notification-drawer always
accessible from the top bar.
It make no sense to show neither, InstallButton nor IssuesLink, when the
installer is configuring a product. So, this change avoid mounting them
at product progress path.
@coveralls
Copy link

coveralls commented Oct 28, 2024

Pull Request Test Coverage Report for Build 11593676518

Details

  • 0 of 5 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 71.449%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rust/agama-lib/src/profile.rs 0 5 0.0%
Totals Coverage Status
Change from base Build 11590767690: -0.01%
Covered Lines: 16937
Relevant Lines: 23705

💛 - Coveralls

dgdavid and others added 14 commits October 28, 2024 19:34
…taller options" actions (#1690)

## Problem

The `Install` button is kind of hidden in the `Overview` page, where
users have to come back after fixing installation issues (if any) for
start the installation. Twice effort for users: to guess where such a
button is and to come back to hit it once the installer is happy and
ready to proceed.

Additionally, the `Download logs` and `Installer options` actions are
mounted in the _application sidebar_, which is not always available,
making impossible to access them in screens such as _Product Selection_
or _Installation Finished_.

## Solution

Move all these actions to the top bar, which is always mounted, visible,
and accessible. To do so, many changes were needed here and there to.
See the related commits to know more.


## Notes

*  The`About` component has been deleted too since it was kind of useless at
this moment.
* Commit f10153b, which
removed the _Instalaltion.jsx_ component, might fix #1616
* All _.js_ and _.jsx_ touched files were migrated to TypeScript, which
made needed to add a _custom.d.ts_ file to avoid TypeScript complaints
at the time to import icons from `@material-symbols/svg-400` package.
See e02c3a2
and https://webpack.js.org/guides/typescript/#importing-other-assets for more details
* All copyright dates of touched files were properly updated.
* As said in the [commit](d14ff33),
**the warning issues link is kind of temporary until it gets improved too**
You must always use the ${{ }} expression syntax or escape with '', "", or ()
when the expression starts with !, since ! is reserved notation in YAML format.

https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/using-conditions-to-control-job-execution
## Problem

- The GitHub Actions fail with this error: `The workflow is not valid.
.github/workflows/weblate-update-pot.yml: Unexpected tag
'!github.event.repository.fork'`

## Solution

- From the documentation: You must always use the `${{ }}` expression
syntax or escape with `''`, `""`, or `()` when the expression starts
with `!`, since `!` is reserved notation in YAML format.
- See
https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/using-conditions-to-control-job-execution
Agama-weblate commit: 545486c6f22e656a537d8eb95164448d26c2cbf1
Agama-weblate commit: 545486c6f22e656a537d8eb95164448d26c2cbf1
Agama-weblate commit: 545486c6f22e656a537d8eb95164448d26c2cbf1
Updating the web translation files from the agama-weblate repository
Updating the product translations from the agama-weblate repository
Updating the service translation files from the agama-weblate repository
It was broken when migration layout/Icon.jsx to layout/Icon.tsx in
#1690
Since it has been touched in a previous commit, moves it to TypeScript
although still being an unfinished component and its future is even
unknown.
That was at core/EmptyState because props were not well defined when
using JSDoc. Now these props are properly defined with TypeScript, such
a directive is no longer necessary.
## Problem

Unfortunately, #1690 broken a
type import at core/EmptyState component that has been cough [by
OBS](https://build.opensuse.org/package/live_build_log/systemsmanagement:Agama:Devel/agama-web-ui/openSUSE_Tumbleweed/x86_64)


## Solution

To use the right type
(d9554b1)
and take the opportunity for migrating the component to TypeScript
(9719d0b)
which makes possible to get rid of a `@ts-expect-error` directive
(749db9e)

## Testing

Tested manually by running `NODE_ENV=production npm run build`
@joseivanlopez joseivanlopez force-pushed the show-config branch 2 times, most recently from b514a48 to 838d739 Compare October 29, 2024 15:04
Improvements in JSON conversions for storage config:

* Do not fail when setting config
#1706.
* Do not generate search wildcard. The *search* JSON is always generated
in its expanded form.
@joseivanlopez joseivanlopez changed the title feature(storage): show storage config storage: add support for storage config Oct 30, 2024
- Note: ProposaResult type is going to disappear.
@joseivanlopez joseivanlopez changed the title storage: add support for storage config web: add support for storage config Oct 30, 2024
@joseivanlopez joseivanlopez marked this pull request as ready for review October 30, 2024 13:19
Copy link
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

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

LGTM

@joseivanlopez joseivanlopez merged commit fe69e94 into storage-config-ui Oct 30, 2024
@joseivanlopez joseivanlopez deleted the show-config branch October 30, 2024 14:17
@imobachgs imobachgs mentioned this pull request Jan 10, 2025
imobachgs added a commit that referenced this pull request Jan 13, 2025
Update to release version 11.

* #1495
* #1564
* #1617
* #1618
* #1625
* #1626
* #1627
* #1628
* #1630
* #1631
* #1632
* #1633
* #1634
* #1635
* #1636
* #1639
* #1640
* #1641
* #1642
* #1643
* #1644
* #1645
* #1646
* #1647
* #1648
* #1649
* #1650
* #1651
* #1652
* #1654
* #1655
* #1656
* #1657
* #1660
* #1663
* #1666
* #1667
* #1668
* #1670
* #1671
* #1673
* #1674
* #1675
* #1676
* #1677
* #1681
* #1682
* #1683
* #1684
* #1687
* #1688
* #1689
* #1690
* #1691
* #1692
* #1693
* #1694
* #1695
* #1696
* #1698
* #1699
* #1702
* #1703
* #1704
* #1705
* #1707
* #1708
* #1709
* #1710
* #1711
* #1712
* #1713
* #1714
* #1715
* #1716
* #1717
* #1718
* #1720
* #1721
* #1722
* #1723
* #1727
* #1728
* #1729
* #1731
* #1732
* #1733
* #1734
* #1735
* #1736
* #1737
* #1740
* #1741
* #1743
* #1744
* #1745
* #1746
* #1751
* #1753
* #1754
* #1755
* #1757
* #1762
* #1763
* #1764
* #1765
* #1766
* #1767
* #1769
* #1771
* #1772
* #1773
* #1774
* #1777
* #1778
* #1785
* #1786
* #1787
* #1788
* #1789
* #1790
* #1791
* #1792
* #1793
* #1794
* #1795
* #1796
* #1797
* #1798
* #1799
* #1800
* #1802
* #1803
* #1804
* #1805
* #1807
* #1808
* #1809
* #1810
* #1811
* #1812
* #1814
* #1815
* #1821
* #1822
* #1823
* #1824
* #1825
* #1826
* #1827
* #1828
* #1830
* #1831
* #1832
* #1833
* #1834
* #1835
* #1836
* #1837
* #1838
* #1839
* #1840
* #1841
* #1842
* #1843
* #1844
* #1845
* #1847
* #1848
* #1849
* #1850
* #1851
* #1854
* #1855
* #1856
* #1857
* #1860
* #1861
* #1863
* #1864
* #1865
* #1866
* #1867
* #1871
* #1872
* #1873
* #1875
* #1876
* #1877
* #1878
* #1880
* #1881
* #1882
* #1883
* #1884
* #1885
* #1886
* #1888
* #1889
* #1890
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.

6 participants