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

fix(VBtnToggle): restructure styles #7515

Merged
merged 2 commits into from
Jun 16, 2019
Merged

fix(VBtnToggle): restructure styles #7515

merged 2 commits into from
Jun 16, 2019

Conversation

johnleider
Copy link
Member

Description

Allow manual override of btn color/size, improve state visual clarity. Slightly deters from spec in that the non-active buttons have a lower opacity, but greatly improves visual clarity when using anything other than the default styles.

Motivation and Context

fixes #7420

How Has This Been Tested?

visual

Markup:

// Paste your FULL Playground.vue here
<template>
  <div class="ma-5 pa-5">
    <v-card
      flat
      class="py-5"
    >
      <v-card-text>
        <v-layout
          column
          align-center
        >
          <v-btn-toggle
            v-model="toggle_exclusive"
            rounded
            multiple
            dark
          >
            <v-btn
              color="primary"
              value="a"
            >
              Option A
            </v-btn>
            <v-btn
              color="primary"
              value="b"
            >
              Option B
            </v-btn>
            <v-btn
              color="primary"
              value="c"
            >
              Option C
            </v-btn>
            <v-btn
              color="primary"
              value="d"
            >
              Option D
            </v-btn>
          </v-btn-toggle>
          <div class="my-5"></div>
          <v-btn-toggle
            v-model="toggle_exclusive"
            rounded
            multiple
            dark
          >
            <v-btn
              value="a"
              small
            >
              Option A
            </v-btn>
            <v-btn
              value="b"
              small
            >
              Option B
            </v-btn>
            <v-btn
              value="c"
              small
            >
              Option C
            </v-btn>
            <v-btn
              value="d"
              small
            >
              Option D
            </v-btn>
          </v-btn-toggle>
          <div class="my-5"></div>
          <v-btn-toggle
            v-model="toggle_exclusive"
            rounded
            multiple
            color="pink"
          >
            <v-btn
              value="a"
              large
            >
              Option A
            </v-btn>
            <v-btn
              value="b"
              large
            >
              Option B
            </v-btn>
            <v-btn
              value="c"
              large
            >
              Option C
            </v-btn>
            <v-btn
              value="d"
              large
            >
              Option D
            </v-btn>
          </v-btn-toggle>
        </v-layout>
      </v-card-text>
    </v-card>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        toggle_exclusive: ['a', 'b', 'c', 'd'],
      }
    },
  }
</script>

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and breaking changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

allow manual override of btn color/size, improve state visual clarity

fixes #7420
@johnleider johnleider added the T: bug Functionality that does not work as intended/expected label Jun 14, 2019
@johnleider johnleider added this to the v2.0.0 milestone Jun 14, 2019
@johnleider johnleider requested review from a team June 14, 2019 16:45
@johnleider johnleider self-assigned this Jun 14, 2019
@codecov
Copy link

codecov bot commented Jun 16, 2019

Codecov Report

Merging #7515 into next will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #7515      +/-   ##
==========================================
+ Coverage   87.14%   87.16%   +0.01%     
==========================================
  Files         325      325              
  Lines        8443     8443              
  Branches     2116     2116              
==========================================
+ Hits         7358     7359       +1     
+ Misses        995      994       -1     
  Partials       90       90
Impacted Files Coverage Δ
...es/vuetify/src/components/VBtnToggle/VBtnToggle.ts 100% <ø> (ø) ⬆️
packages/vuetify/src/components/VSelect/VSelect.ts 94.42% <0%> (+0.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40977fa...9b04f4d. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jun 16, 2019

Codecov Report

Merging #7515 into next will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #7515      +/-   ##
==========================================
+ Coverage   87.14%   87.16%   +0.01%     
==========================================
  Files         325      325              
  Lines        8443     8443              
  Branches     2116     2116              
==========================================
+ Hits         7358     7359       +1     
+ Misses        995      994       -1     
  Partials       90       90
Impacted Files Coverage Δ
...es/vuetify/src/components/VBtnToggle/VBtnToggle.ts 100% <ø> (ø) ⬆️
packages/vuetify/src/components/VSelect/VSelect.ts 94.42% <0%> (+0.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40977fa...9b04f4d. Read the comment docs.

@johnleider johnleider merged commit 4b4b1a1 into next Jun 16, 2019
@johnleider johnleider deleted the fix/#7420-v-btn-toggle branch June 16, 2019 22:10
@lock lock bot locked as resolved and limited conversation to collaborators Jul 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants