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

dropdown/select: when there is no placeholder, label will have default font-size #134

Open
wants to merge 1 commit into
base: sunMota/dropdown-focus-border
Choose a base branch
from

Conversation

sun-mota
Copy link
Contributor

@sun-mota sun-mota commented Dec 19, 2024

Alaska Airlines Pull Request

Before Submitting this pull request:

  • Link all tickets in this repository related to this PR in the Development section
    note: all pull requests require at least one linked ticket
  • If this PR is Ready For Review, all ticket's linked under Development must have their status changed to Ready For Review as well

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I have performed a self-review of my own update.

Summary by Sourcery

Update the dropdown and select components to use the default font size for labels when no trigger content is present. Update the default placeholder for auro-select to an empty string.

Copy link

sourcery-ai bot commented Dec 19, 2024

Reviewer's Guide by Sourcery

This PR updates the dropdown and select components to use the default font size for labels when no placeholder is provided.

Class diagram for AuroDropdown component updates

classDiagram
    class AuroDropdown {
        -_hasTriggerContent: boolean
        -triggerContentSlot: undefined
        +hasTriggerContent: boolean
        +handleTriggerContentSlotChange(event)
        +firstUpdated()
        +render()
    }
    note for AuroDropdown "Added new properties and methods to handle trigger content and label font size"
Loading

File-Level Changes

Change Details Files
Updated the auro-dropdown component to support default font size for labels when there is no placeholder text.
  • Added hasTriggerContent property to track the presence of trigger content.
  • Added logic to update hasTriggerContent based on the content of the "trigger" slot.
  • Added styles to apply default font size to the label when hasTriggerContent is false.
  • Updated the template to conditionally apply the hasTrigger attribute to the label based on the value of hasTriggerContent.
components/dropdown/src/auro-dropdown.js
components/dropdown/src/styles/style.scss
Updated the auro-select component to set an empty string as the default value for the placeholder property.
  • Changed the default value of the placeholder property from "Please select option" to an empty string "".
  • Updated API documentation to reflect the change in the default placeholder value.
  • Added logic to notify the dropdown component when the trigger content changes to ensure the label font size is updated correctly.
components/select/src/auro-select.js
components/select/demo/api.md
components/select/docs/api.md
Updated package version and changelog.
  • Updated the package version to 1.6.0-beta.7.
  • Added a changelog entry for the changes in this PR.
package.json
CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ sun-mota
❌ semantic-release-bot
You have signed the CLA already but the status is still pending? Let us recheck it.

@sun-mota sun-mota marked this pull request as ready for review December 19, 2024 23:04
@sun-mota sun-mota requested a review from a team as a code owner December 19, 2024 23:04
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @sun-mota - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

components/dropdown/src/styles/style.scss Outdated Show resolved Hide resolved
@sun-mota sun-mota force-pushed the sunMota/label-no-placeholder/36 branch from 6b43eb1 to 7d8a06d Compare December 19, 2024 23:09
@sun-mota sun-mota linked an issue Dec 19, 2024 that may be closed by this pull request
@sun-mota sun-mota force-pushed the sunMota/dropdown-focus-border branch from 31b7a76 to 6d2c44c Compare December 19, 2024 23:11
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.

SELECT: label doesn't move up when value is selected
2 participants