-
Notifications
You must be signed in to change notification settings - Fork 299
fix: Fixed the issue of misalignment between the clear and search buttons for four different sizes in mobile first mode of the search component #3378
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
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughThe updates adjust the search component's appearance and example usage. In the example Vue file, a third search input is added with a new data property, and placeholder texts are standardized to English and aligned with their respective sizes. The search component's internal template simplifies class bindings for anchor elements, removing conditional logic and applying static classes. Corresponding CSS class definitions are consolidated, standardizing button widths and line heights across size variants to ensure uniform styling. Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
examples/sites/demos/mobile-first/app/search/size.vueOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-vue". (The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. packages/vue/src/search/src/token.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-vue". (The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. packages/vue/src/search/src/mobile-first.vueOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-vue". (The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (6)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis PR addresses the misalignment issue between the clear and search buttons in the search component for four different sizes in mobile-first mode. The changes involve modifying the template and styling to ensure proper alignment across different sizes. Changes
|
<tiny-search class="demo-search" v-model="value1" size="medium" placeholder="请输入关键词" clearable></tiny-search> | ||
<tiny-search class="demo-search" v-model="value2" size="mini" placeholder="请输入关键词" clearable></tiny-search> | ||
<tiny-search class="demo-search" v-model="value1" size="medium" placeholder="medium" clearable></tiny-search> | ||
<tiny-search class="demo-search" v-model="value2" placeholder="small" clearable></tiny-search> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the placeholder text accurately reflects the intended size for clarity.
" | ||
@click="clear" | ||
> | ||
<a :class="m(gcls('pc-search-input-btn-transtion-a'))" @click="clear"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of size-specific classes might affect the visual consistency across different sizes. Verify that the new class structure maintains the intended design.
'pc-search-input-btn-transtion-a-medium': 'leading-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))]', | ||
'pc-search-input-btn-transtion-a-mini': 'leading-[calc(theme(spacing.6)-2*theme(borderWidth.DEFAULT))]', | ||
'pc-search-input-btn-transtion-a-unbig': 'leading-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))]', | ||
'pc-search-input-btn-transtion-a': 'no-underline block w-8 leading-none', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to a uniform leading style might impact the button's alignment. Confirm that this change does not introduce new alignment issues.
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Style
Refactor