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

[WIP] [GSoC] Add Tab Arrangement and Tab components. #2224

Open
wants to merge 27 commits into
base: ucr
Choose a base branch
from

Conversation

jsuyash1514
Copy link
Contributor

This is a draft PR, submitted for the evaluations.

I've added 2 components: TabArrangement and Tab
The properties implemented for both the components are listed below:

1.) TabArrangement

  • TabBackgroundColor
  • SelectedTabIndicatorColor
  • TabTextColor
  • SelectedTabTextColor
  • ShowTabsAtBottom

2.) Tab

  • Text
  • ShowText
  • Icon
  • ShowIcon

@ellelili2025 Kindly have a look.

@AppInventorWorkerBee
Copy link
Collaborator

Can one of the admins verify this patch?

@ellelili2025
Copy link
Contributor

ellelili2025 commented Jul 8, 2020

Let us fix the coding style first.

  1. Array all the imports in Alphabet order.
  2. for the control logic blocks such as if, for etc such as the following
    if(tabLayout.getParent() != null) {
    Put a space between if and (
    so it should look like
    if (tabLayout.getParent() != null) {
    3.void addTab(Tab tab){
    add a space between ) and {
    so it would look like void addTab(Tab tab) {

Copy link
Contributor

@ellelili2025 ellelili2025 left a comment

Choose a reason for hiding this comment

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

if(tabBarVisible) {

Leave a space between if and ( to be consistent with the coding style in appinventor.

@ellelili2025
Copy link
Contributor

Issue I observe:
Put some UIs such as buttons in the tab and set Height/width to fill parent for those UIs. The height/width fill parent is not honored.

@ellelili2025
Copy link
Contributor

Please rebase the branch on ucr since the changes for android sdk29 have been merged so that this branch only contains the changes for tab and tab arrangement.

import com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidThemeChoicePropertyEditor;
import com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidToastLengthChoicePropertyEditor;
import com.google.appinventor.client.editor.youngandroid.properties.YoungAndroidVerticalAlignmentChoicePropertyEditor;
import com.google.appinventor.client.editor.youngandroid.properties.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't want use to ambitious wildcard imports.

import com.google.appinventor.client.editor.simple.components.MockVerticalArrangement;
import com.google.appinventor.client.editor.simple.components.MockVideoPlayer;
import com.google.appinventor.client.editor.simple.components.MockWebViewer;
import com.google.appinventor.client.editor.simple.components.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same case here. no * import.

@ellelili2025
Copy link
Contributor

This branch is no longer compilable. Could you take a look please?

@jsuyash1514
Copy link
Contributor Author

@ellelili2025 I've rebased my branch and fixed the build errors. Please let me know if it is still not compilable.

@jsuyash1514 jsuyash1514 marked this pull request as ready for review August 13, 2020 13:35
@ewpatton ewpatton added this to the GSOC Release milestone Sep 1, 2020
@BeksOmega
Copy link
Collaborator

Hi Suyash! I gave the test server a quick look and I found two little things.

  1. It seems like the tab text is a bit high when you're dragging it out of the toolbox. I expect it to be at the cursor like labels are. But there may be a reason for having it higher that I don't know about.
    Tab:
    TabText
    Label:
    LabelText

  2. I wasn't able to test this because I couldn't get my phone to download the test companion. But are nested tab layouts supported? How does that interact with using the swipe gesture to change tabs?
    NestedTabs

Overall the project looks really cool though :D I love all of the different toggles the components have.

@ewpatton ewpatton modified the milestones: GSOC Release, nb187 Dec 1, 2020
@ewpatton ewpatton removed this from the nb187 milestone Aug 4, 2021
@SusanRatiLane SusanRatiLane self-assigned this Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants