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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Replace Spacer with Expanded to avoid overflow #1791

Merged

Conversation

validcube
Copy link
Member

@validcube validcube commented Mar 27, 2024

Team are going to make a joke now :trollface:, 44 hours on decoration for a 10 seconds change

馃槉 Issue

@MarcaDian created an issue with our source switcher regarding the [AlertDialog] [title] being too long and caused the [IconButton] to overflowed out of the view here:

The relevant code was line 30-40 in Settings Fragment - Manage Sources

title: Row(
children: <Widget>[
Text(t.settingsView.sourcesLabel),
const Spacer(),
IconButton(
icon: const Icon(Icons.manage_history_outlined),
onPressed: () => showResetConfirmationDialog(context),
color: Theme.of(context).colorScheme.secondary,
),
],
),

[Spacer] tried to take up all the remaining space after those two widgets (Text & IconButton) by default it will take one yade yada (I hope I'm right) - tl;dr: we basically have very limited space - now obviously as you can see in #1790 that ended up being a failure, so what I do is we switch to [Expanded] which surprisingly works a lot better... (well yeah no sh-)

馃敡 Testing note

Testing was done in "simulated" environment, which means I didn't edit ReVanced Manager code, but I recreated it in some online editor, specifically DartPad which work super well in my opinion.

20240327_123737.mp4

(It's encoded using HEVC, you might need additional setup, deal with it :trollface:)

fix: #1790

@validcube validcube requested a review from Ushie March 27, 2024 07:11
@validcube validcube self-assigned this Mar 27, 2024
@validcube
Copy link
Member Author

I was supposed to actually mention #1790

@validcube validcube linked an issue Mar 27, 2024 that may be closed by this pull request
4 tasks
@validcube validcube marked this pull request as draft March 27, 2024 11:05
@validcube validcube changed the title fix(Settings - Source): Replace Spacer with Expanded to avoid overflow fix: Replace Spacer with Expanded to avoid overflow Mar 28, 2024
@validcube validcube marked this pull request as ready for review March 28, 2024 04:37
@validcube validcube merged commit 6f70a07 into dev Mar 28, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Mar 28, 2024
## [1.19.4-dev.3](v1.19.4-dev.2...v1.19.4-dev.3) (2024-03-28)

### Bug Fixes

* Replace Spacer with Expanded to avoid overflow ([#1791](#1791)) ([6f70a07](6f70a07))
@validcube validcube deleted the 1790-bug-the-button-is-out-of-place-if-the-title-is-long branch March 28, 2024 04:53
github-actions bot pushed a commit that referenced this pull request Apr 5, 2024
# [1.20.0](v1.19.3...v1.20.0) (2024-04-05)

### Bug Fixes

* disable proguard obfuscation ([401646a](401646a))
* Do not crash when selecting an APK from storage ([#1768](#1768)) ([8564c1a](8564c1a))
* Don't translation ReVanced repository ([c265794](c265794))
* Ensure safe area usage in Changelogs Modal Bottom Sheet ([#1772](#1772)) ([c981cb4](c981cb4))
* Pre-releases changelog being shown ([#1767](#1767)) ([add49e1](add49e1))
* Replace Spacer with Expanded to avoid overflow ([#1791](#1791)) ([6f70a07](6f70a07))
* Set text colour on dropdown menu for Custom Value ([966796d](966796d)), closes [#1584](#1584)
* **ui:** Support free-scroll and auto-scroll for the installer logs ([#1736](#1736)) ([#1836](#1836)) ([025ff52](025ff52))

### Features

* Improve language update settings ([#1838](#1838)) ([f9e6ef3](f9e6ef3))
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.

bug: The button is out of place if the title is long
1 participant