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: component style update #1452

Merged
merged 1 commit into from Feb 20, 2023
Merged

fix: component style update #1452

merged 1 commit into from Feb 20, 2023

Conversation

danranVm
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

  • Select 的分组 label 的字体为 10px => 12px
  • ProTable 的布局设置的样式问题

What is the new behavior?

Other information

<IxSelectOption key="https" label="https://"></IxSelectOption>
<IxSelectOption key="http" label="http://"></IxSelectOption>
</IxSelect>
</template>
<template #addonAfter>
<IxSelect v-model:value="addonAfter" style="width: 60px">
<IxSelect v-model:value="addonAfter" style="width: 72px">
<IxSelectOption key="com" label=".com"></IxSelectOption>
<IxSelectOption key="cn" label=".cn"></IxSelectOption>
</IxSelect>
Copy link

Choose a reason for hiding this comment

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

:

It looks like the patch is intended to update the width of two components in this code. The width property of the first component has been changed from 80px to 88px, and the second one from 60px to 72px.

From a bug risk perspective, it is unlikely that any bugs will be introduced as a result of this change. However, it is possible that the width of the components is being updated for a reason and increasing them further could affect the layout of the page or cause overlapping elements. Therefore, it would be recommended to test the page after making the change to ensure there are no issues.

In terms of improvement suggestions, if the size of the components needs to be changed, it would be better to refactor the code to use a variable or class name instead of hard-coding the values. This would make it easier to maintain the code in the future and ensure that all components have the same width.

@idux-bot
Copy link

idux-bot bot commented Feb 20, 2023

This preview will be available after the AzureCI is passed.

@@ -35,7 +35,7 @@

&-option-group {
.reset-component();
.select-option(@select-option-font-size - 2px, @select-option-group-color);
.select-option(var(--ix-font-size-sm), @select-option-group-color);

display: block;
margin: @select-option-group-margin;
Copy link

Choose a reason for hiding this comment

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

with the code review

The code patch changes the font size of the select option from 2px to var(--ix-font-size-sm). The use of a variable is good as it would allow for easier and more consistent styling of the select option.

However, there are some risks associated with this code. For example, if the --ix-font-size-sm variable is not defined, or is not set correctly, it could lead to unexpected styling outcomes. It would be best to verify that the variable is defined and set correctly before using it.

In addition, it would be good to add comments above the code patch to explain why the change was made and what it does. This will help anyone reading the code quickly understand the purpose of the patch.


.@{checkbox-prefix}-input {
margin: 0 4px;
}
}

&-tree {
Copy link

Choose a reason for hiding this comment

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

This code patch looks fine. The code is used to style a checkbox component with the class '.@{checkbox-prefix}-input' and setting margin of 4px. The changes look good and there is no bug risk in this code.

In terms of improvement, it would be good to make sure that the margin is adjusted to fit different screen sizes. Additionally, it would be helpful to add comments to the code so others can understand what it is doing more easily.

@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #1452 (bfb526d) into main (388da6a) will decrease coverage by 0.10%.
The diff coverage is 81.25%.

❗ Current head bfb526d differs from pull request most recent head 7e53316. Consider uploading reports for the commit 7e53316 to get more accurate results

@@            Coverage Diff             @@
##             main    #1452      +/-   ##
==========================================
- Coverage   92.98%   92.89%   -0.10%     
==========================================
  Files         327      327              
  Lines       30350    30399      +49     
  Branches     2560     3507     +947     
==========================================
+ Hits        28221    28238      +17     
- Misses       2129     2161      +32     
Impacted Files Coverage Δ
packages/cdk/utils/src/dom.ts 78.97% <18.18%> (-8.69%) ⬇️
packages/components/empty/src/Images.tsx 100.00% <100.00%> (ø)
packages/cdk/drag-drop/src/state.ts 7.69% <0.00%> (-8.98%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@danranVm danranVm merged commit c07ef31 into IDuxFE:main Feb 20, 2023
@danranVm danranVm deleted the fix-comp-style branch February 27, 2023 08:55
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.

None yet

1 participant