-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
luci-app-opkg: add warning about modifying packages #6932
Conversation
8744961
to
1594bd6
Compare
Luci has UI notification API that can be used like:
Maybe you can use it instead? |
Not optimal if it causes a pop-up or a button that must be clicked away.
|
Having a pop-up show up every time you navigate to the updates tab will most likely be very annoying to the user. |
I agree and beside this IMHO it still makes sense: users not so often opening the page and at least they may close the notification. It's may be sorted later to remember that a user dismissed a notification. |
Please also add warning banners that installing packages and removing packages can cause soft bricks or break access to the ui. |
Great suggestion, I'll look into adding that. |
1594bd6
to
183819d
Compare
Shall we add more banners and warnings that using openwrt will also
potentially soft brick their devices? 😉
Please also add warning banners that *installing* packages and *removing*
… packages can cause soft bricks or break access to the ui.
|
I've updated the PR title, commit message, and screenshots to reflect the suggestion by @jow- |
183819d
to
30a72bd
Compare
30a72bd
to
4fbfe3f
Compare
@stokito @systemcrash @jow- is there any other changes we want or does it make sense to start thinking of merging it? |
@@ -1206,6 +1206,13 @@ return view.extend({ | |||
]) | |||
]), | |||
|
|||
E('div', { 'class': 'alert-message warning' }, [ | |||
E('p', _('Warning! Installing, removing, and upgrading packages may cause serious problems, including soft-bricking your device!')), | |||
E('p', _('See <a %s">explanation on wiki</a> why especially upgrading should be avoided.').format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace <a %s">
with <a %s>
Is it possible to reduce the warning text to a concise nugget? That page is now exploding with lines, colours and text and this does not make it easier to handle. How about:
|
Absolutely, I like that idea. |
4fbfe3f
to
10bb1f4
Compare
And now... to acknowledge this big warning dialogue. @yurtpage suggested
But maybe something more resilient. Like an 'acknowledge' button, that when clicked, stores a boolean flag in the config that determines whether the warning is shown at page load. We've done our diligence, the user can hide the warning. What do you think @dannil ? |
Yes, I've actually thought about that too. I think we could do something akin to how the "Confirm" button behaves in warning dialogs (such as when you don't have a password set on your root user), here's an example from nftables: Do we think it would be necessary to have a checkbox somewhere else (like under the "Configure opkg..." dialog) that would enable users to show the warning again? I personally think it shouldn't be needed. |
|
Unnecessary to show again. A factory reset or someone who knows what they're doing is sufficient. Your proposal is also good. 👌
Single line looks better 🥳 |
Honestly I think it would be better to make same introduction paragraph as other pages have: <div class="cbi-map-descr">
Install additional software and upgrade existing packages with opkg..
<br><b>Warning!</b> Package operations <a href="href="https://openwrt.org/meta/infobox/upgrade_packages_warning" target="_blank" rel="noreferrer">can break your system</a>
</div> I.e. the warning can be just a sentence in the introduction. We may add more important notes e.g. about feeds and disk space usage. BTW the article in Wiki is in inbox e.g. in "draft" state. On the wiki itself not so much of information about package management https://openwrt.org/docs/guide-user/additional-software/start |
Also good. Less intrusive yet ever present. |
I like this as well, especially the less intrusive part. Also, I've had trouble to implement a UCI config for opkg (since the package itself doesn't define this I need to do some hacky solution with creating the file from the LuCI app, which I don't like) which can entirely be avoided with the above suggestion. I'll implement this solution in the following days since it's both much less intrusive and way easier technically to implement since we don't need the whole "Hide" logic. |
It is a well-known fact that opkg doesn't check ABI-compatibility between dependencies and upgrading packages in a stable release is therefore not recommended. In addition, installing and removing packages blindly may result in rendering the device inaccessible as well, so caution should be taken when doing this. This commit adds a warning which should help notify especially new users about these behaviors with a link to the wiki which advises to not upgrade packages. Signed-off-by: Daniel Nilsson <[email protected]>
10bb1f4
to
d5b79a0
Compare
Merged. Thanks @dannil ! |
A proposal for a fix for #6413
It is a well-known fact that opkg doesn't check ABI-compatibility between dependencies and upgrading packages in a stable release is therefore not recommended. In addition, installing and removing packages blindly may result in rendering the device inaccessible as well, so caution should be taken when doing this.
This commit adds a warning which should help notify especially new users about these behaviors with a link to the wiki which advises to not upgrade packages.
See https://openwrt.org/meta/infobox/upgrade_packages_warning for more info, which is the same link that is used in the second paragraph.
Tested on Chrome and Firefox, both desktop and mobile (Android). All CSS used is theme-compatible and should therefore look at least decent across different themes.
First iteration of design, not relevant anymore
BootstrapLight:
BootstrapDark:
Material:
OpenWrt2020: