Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merges extensions into one page #1656

Merged
merged 33 commits into from
May 11, 2023
Merged

Merges extensions into one page #1656

merged 33 commits into from
May 11, 2023

Conversation

arcbtc
Copy link
Member

@arcbtc arcbtc commented Apr 26, 2023

Gets rid of "Manage Extensions" page and merges into "Extensions"

Check admin here https://extdemo.satoshigo.app/extensions?usr=2f1c28dd6ce44f7884edde1c8269b3c1

Extra

  • merge Manage Extensions into Extensions
  • check if the extension version is compatible with the LNbits version
    • do not allow install if the versions are incompatible (check on both back-end and front-end)
    • new field for minimum required LNbits version: "min_lnbits_version". And for release warning: warning

inextensions.json

        {
            "id": "watchonly",
            "repo": "https://github.com/lnbits/watchonly",
            "name": "Onchain Wallet",
            "version": "0.2.1",
            "min_lnbits_version": "0.10.7",
            "warning": "It is RECOMMENDED to set this extension as admin-only. Anyone with acceess can create any number of relays!",
            ...
        },

or in config.json:

{
  "name": "Onchain Wallet",
  "short_description": "Onchain watch only wallets",
  "tile": "/watchonly/static/bitcoin-wallet.png",
  "min_lnbits_version": "10.8",
  "warning": "This is NOT the official repo",
  "contributors": ["arcbtc", "motorina0"]
}
  • show error message on the UI

    • image
  • show warning message on the UI

    • image
  • show New Version when a new version is available

    • image
  • i18n text in extensions.html

Tests

  • only admins can install, uninstall, upgrade, activate and deactivate extensions (regular users are not allowed)
  • installed extensions show their version on the card
  • setting the min_lnbits_version to a future LNbits version will not allow the installation
  • setting the min_lnbits_version to a lower version (or empty) must allow the install
  • setting the warning field in the extensions.json or in the config.json will show the when the release is expanded
  • if a new version of an extension is added then the New Version badge is displayed

@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2023

Codecov Report

Merging #1656 (fbc4666) into main (95071eb) will increase coverage by 0.38%.
The diff coverage is 47.61%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main    #1656      +/-   ##
==========================================
+ Coverage   48.43%   48.81%   +0.38%     
==========================================
  Files          47       47              
  Lines        7047     7092      +45     
==========================================
+ Hits         3413     3462      +49     
+ Misses       3634     3630       -4     
Impacted Files Coverage Δ
lnbits/core/services.py 39.34% <0.00%> (ø)
lnbits/core/views/api.py 37.12% <16.66%> (-0.55%) ⬇️
lnbits/core/views/generic.py 51.87% <50.00%> (+7.60%) ⬆️
lnbits/extension_manager.py 54.59% <55.31%> (+7.97%) ⬆️
lnbits/settings.py 86.89% <100.00%> (+0.06%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@motorina0

This comment was marked as resolved.

@motorina0

This comment was marked as resolved.

@motorina0

This comment was marked as resolved.

@motorina0

This comment was marked as resolved.

></q-btn>
</p>
<div class="col-sm-9 col-xs-12">
<p class="text-h4 gt-sm">Extensions</p>

This comment was marked as resolved.

@motorina0

This comment was marked as resolved.

@callebtc

This comment was marked as resolved.

@arbadacarbaYK

This comment was marked as resolved.

@arcbtc

This comment was marked as resolved.

@arcbtc

This comment was marked as resolved.

@arcbtc
Copy link
Member Author

arcbtc commented May 2, 2023

Just checked and this is a different bug, for some reason descriptions are missing for some extensions

@motorina0 motorina0 force-pushed the extensionclear branch 2 times, most recently from e10c857 to d23f66f Compare May 3, 2023 08:02
@motorina0

This comment was marked as resolved.

@motorina0

This comment was marked as resolved.

@arbadacarbaYK

This comment was marked as off-topic.

@motorina0

This comment was marked as duplicate.

@callebtc callebtc added enhancement Make something better frontend User-facing changes labels May 9, 2023
@motorina0
Copy link
Collaborator

IMO the features enable+activate+open and disable+uninstall are not clear enough.

@arbadacarbaYK thanks for the input. This is a pretty big change (UI wise). It can be discussed in a different PR/issue. (not included in this PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Make something better frontend User-facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants