pd4d10 / git-touch

An open-source app for GitHub, GitLab, Bitbucket, Gitea, and Gitee(码云), built with Flutter
Apache License 2.0
1.56k stars 134 forks source link

Truncated tab text in English #130

Open ghost opened 3 years ago

ghost commented 3 years ago

The "Repositories" tab text in the search view is being truncated in English. Making it seem to say "Repositorie"

SmartSelect_20201213-144035

shreyas1599 commented 3 years ago

I was trying this. This is what I could come up with:

bottom: TabBar(
        isScrollable: true,
        onTap: _onTabSwitch,
        tabs: tabs
            .map((text) => Tab(
                child: Container(
                    width: MediaQuery.of(context).size.width / tabs.length,
                    child: Center(child: Text(text.toUpperCase())))))
            .toList(),
      ),

but it makes the Tab bar scrollable and looks something like this:

image

Without creating a container and just making isScrollable: true leads to the tabs being centred.

image

The only way to expand the tab is to make isScrollable: true as equal space is allocated for all tabs otherwise. An alternative is to just rename "Repositories" as "Repos" but even the notifications tab has a tab named "Participating" which overflows, so renaming does not seem like the best way. @pd4d10 is there any other implementation you can think of?

ghost commented 3 years ago

Changing the translation to "Repos" would fix the issue, but this problem would likely prop up with other languages, which might not have as easily fixes. Does centering the tabs in the Notifications view fix the truncated text?

ghost commented 3 years ago

Since pd4d10 is Chinese, some of the git-touch UI is made expecting a similarly compressed language. Some other UI elements may need to be changed to be more translation friendly. Maybe see how FastHub handles certain views?

shreyas1599 commented 3 years ago

Maybe see how FastHub handles certain views?

All of FastHubs tabs under the page title are scrollable elements

fitojb commented 3 years ago

Maybe switching to Roboto Condensed will help a bit