Giter VIP home page Giter VIP logo

vitamin-compose's People

Contributors

adrienbusin avatar adrienmu avatar apauchet avatar clempou avatar corentin-stamper avatar dimitriz09 avatar fdelaha24 avatar gerardpaligot avatar lauthieb avatar manonpolle avatar olivierperez avatar rcarondecathlon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vitamin-compose's Issues

fix - in VitaminTabs, if the list provided is empty, the exception 'NoSuchElementException' is thrown

Describe the bug
In VitaminTabs, if the list provided is empty, the exception 'NoSuchElementException' is thrown.

The behavior is the same for both composable (Fixed and Scrollable)

To Reproduce

VitaminTabs.Scrollable(
    tabItems = listOf(),
)

This will throw

java.util.NoSuchElementException: List is empty.
  at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:214)
  at com.decathlon.vitamin.compose.tabs.VitaminTabs.Scrollable-kKmfEb0(VitaminTabs.kt:77)

bug(button): Large Icon Button wrong size

Describe the bug

Current behavior

Icon Button has not the right size
Large is actually 64.dp

Expected behavior

Large IconButton is 56.dp

Screenshots

image

Smartphone (please complete the following information):

  • Device: all
  • OS: all
  • Version 0.2.0-alpha01

bug(button): Wrong large button height

Describe the bug

Current behavior

Button has not the right size
Large is actually 64.dp

Expected behavior

Large Button is 56.dp

Screenshots

image

image

Smartphone (please complete the following information):

  • Device: all
  • OS: all
  • Version 0.2.0-alpha01

test(quantity-picker): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for quantity picker component for all variants & themes.

Additional context
FYI Buttons already have ones.

Unify the customization of components

Is your feature request related to a problem? Please describe.

We don't have homogeneous way to customize our components. We should unify this before the first official release!

Describe the solution you'd like

We should migrate all colors and sizes customization from function or something else to field approach.

test(radio): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for radio button component for all variants & themes.

Additional context
FYI Buttons already have ones.

Scope all preview functions as internal to avoid any access from the final artifact

Describe the bug

When you import Vitamin Compose in an Android app, you have auto completion for previews inside Vitamin Compose.
These components shouldn't be exposed.

To Reproduce

  1. Import any Vitamin artifact with Preview functions
  2. Try to access to the Preview function by its name

Expected behavior

Only show Vitamin<Component>s objects and their colors, sizes, etc.

RadioButton accessibility is broken

Describe the bug
When using Talkback on radiobutton, there is several accessibility issue :

  • We cannot focus on radiobutton when the element is alone (with no text)
  • We don't have the status of the current selected radiobutton. It only says "RadioBox - Double tap to activate", but we don't not if the current state of the radiobutton is selected or unselected
  • When we double tap to select or unselect a radiobutton, nothing is announce to the user even if something happen on the device.

To Reproduce

166203719-592b5d20-4487-437e-8f26-9820480221bc.mp4

Expected behavior
We should :

  • make radiobutton focusable even when no label is associated to it
  • announce radibutton state in stateDescription for example selected or unselected
  • when state change (meaning when the user perform an action on the radiobutton), we should announce the updated states (this should be automatic if we use stateDescription as mention juste here ⬆️

Screenshots

Smartphone (please complete the following information):

  • Device: ALL
  • OS: ALL
  • Version ALL

feat: add Bitrise action to run instrumented tests

Is your feature request related to a problem? Please describe.

Now we have tests in our project, we should run them in our CI to avoid breaking tests in the future.

Describe the solution you'd like

Create a public Firebase project in Decathlon infrastructure to run our tests in Firebase Test Labs.

test(badge): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for badges component for all variants & themes.

Additional context
FYI Buttons already have ones.

test(appbar): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for appbar component for all variants & themes.

Additional context
FYI Buttons already have ones.

test(modal): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for modal component for all variants & themes.

Additional context
FYI Buttons already have ones.

Remove small size for the button

Describe the bug

In the Figma specification, there isn't small size for the Button component.

To Reproduce

VitaminButtons.Primary(
  /* other parameters */
  sizes = VitaminButtonSizes.small()
)

Expected behavior

Only medium and large sizes available

test(price): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for price component for all variants & themes.

Additional context
FYI Buttons already have ones.

Item labels in the BottomNavigation isn't in the good color

Describe the bug

Colors under the icon in the BottomNavigation should use contentPrimary color.

To Reproduce
Start the sample and check the bottom navigation bar in the AppBars screen.

Expected behavior

Label should use the right color

Screenshots

Expected
image

Missing Text 1, 2, 3 Bold and regular ones are called Body instead of Text

Describe the bug

  • If we want to use the bold version of Text styles, the developer need to declare the text style by themself.
  • In Figma, Text styles are named Body instead of Text.

Expected behavior

We should add text styles for bold versions and declare new text styles for Text styles.
Think to deprecated previous text styles with this change!

bug(modal): Actions buttons on modals are not well positionned

Describe the bug
On modals, buttons are not aligned correctly.
Message

To Reproduce
1. Go to Sample app in Modal screen
2. Add a modal with 1 button

Expected behavior

  • the 1 or 2 right buttons are aligned on the right of the modal
  • the third left button is aligned on the left of the modal

image

Functional specs
image

test(rating): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for rating component for all variants & themes.

Additional context
FYI Buttons already have ones.

test(menu): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for menu component (dropdowns) for all variants & themes.

Additional context
FYI Buttons already have ones.

feat: add testTag for automated testing

Is your feature request related to a problem? Please describe.
When writing automated test on compose screen using component like OutlinedDropdown the lack of testTag modifier on subComponent make those screen hard to test

Describe the solution you'd like
Add testTag on component with userInteraction, for example to trigger the click on the trailing Icon of the anchored Outlined of a OutlinedDropdown

The conversion button text color is not correct in dark mode

Describe the bug

The conversion button text color is not correct in dark mode.

To Reproduce

  1. Activate the dark mode
  2. Open the vitamin-compose sample
  3. Click on Buttons
  4. See the conversion button with white text

Expected behavior

In dark mode, the conversion button text color must remain in the same color as light mode

@Composable
fun conversion(
        backgroundColor: Color = VitaminTheme.colors.vtmnBackgroundAccent,
        contentColor: Color = VitaminTheme.colors.vtmnContentPrimary,
        disabledBackgroundColor: Color = VitaminTheme.colors.vtmnBackgroundAccent
            .copy(alpha = VtmnStatesDisabled),
        disabledContentColor: Color = VitaminTheme.colors.vtmnContentPrimary
            .copy(alpha = VtmnStatesDisabled)
): ButtonColors = ButtonDefaults.buttonColors(
        backgroundColor = backgroundColor,
        contentColor = contentColor,
        disabledBackgroundColor = disabledBackgroundColor,
        disabledContentColor = disabledContentColor
)

Use vtmnContentAccent instead of vtmnContentPrimary

Screenshots

image

Smartphone (please complete the following information):

  • Device: Pixel 6 Pro
  • OS: Android 12
  • Version: 32

icon buttons have content descriptions to null

Describe the bug

content description is hardcoded to null for icon buttons.

To Reproduce

  1. Declare an icon buttons
  2. Try to specify a content description

Expected behavior

New parameter on the component contentDescription: String?

test(checkbox): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for checkbox component for all variants & themes.

Additional context
FYI Buttons already have ones.

The ripple effect does not match the design

Describe the bug
I have the impression that ripples effect are not good since beta 2 before I was on alpha I did not test your develop branch and maybe it is already fixed.

device-2022-12-09-132552.mp4

Wrong buttons colors with physical keyboard navigation

Context

https://developer.android.com/develop/ui/views/touch-and-input/keyboard-input/navigation

TL;DR

"Android supports physical keyboards attached to the device. A keyboard offers not only a convenient mode for text input, but also offers a way for users to navigate and interact with your app. [...], tablets and similar devices are growing in popularity and many users like to attach keyboard accessories."

Describe the bug
The selected state of a button makes the text unreadable.

To Reproduce
Connect a physical keyboard to your device (usb C, or bluetooth).
Launch vitamin compose demo with your bare hands
Navigate to button demo
Now use the keyboard, press "tab" to go from one button to the other

Expected behavior
When a button is selected (or has the "keyboard focus") its text should be readable

Screenshots
Screenshot from 2022-12-14 09-28-25
^ primary
Screenshot from 2022-12-14 09-29-04
^ Ghost living up to his name

Smartphone (please complete the following information):
All

bug: icon is over the text in the bottom navigation

Describe the bug

When you declare a BottomNavigation with too much items and with a long text, the icon is over the text

To Reproduce

  1. Declare a bottom navigation with 5 items
  2. Use "Agenda", "Speakers", "Networking", "Partners" and "Info" as label for items
  3. Configure a random icon for all these items

Expected behavior

Need to define a solution with the design team

Screenshots

Bottom Navigation with wrong icons

Smartphone (please complete the following information):

  • Device: One Plus 7T
  • OS: Android 11
  • Version 21

feat: add access to popup properties from DropdownMenu

Is your feature request related to a problem? Please describe.
I was needing to have the same functionality that AutoCompleteTextView but using Vitamin Compose. But I can't access to PopupProperties because it's not targetable using VitaminMenus.Dropdown.

Modify the PopupProperties will enables me to change the default properties from focusable to not focusable in order to continue to type text even if dropdown is appearing.

Describe the solution you'd like
I would like to have the possibility to define my own PopupProperties from VitaminMenus.Dropdown.

Add radius variants and use them in all components

Is your feature request related to a problem? Please describe.

Because we don't have yet all radius defined in foundation module, we can have mistakes about radius in some components with old values.

Describe the solution you'd like

Declare all radius variants in foundation module and create a local (like colors or typography defined in VitaminTheme) to give an access in all components.

test(divider): Add paparazzi tests

Describe the solution you'd like
Write tests with paparazzi for divider component for all variants & themes.

Additional context
FYI Buttons already have ones.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.