- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 479
 
refactor: Semantic structure re-layout #1166
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
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            72 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      2d61d98
              
                chore: init
              
              
                zombieJ 597ecab
              
                of it
              
              
                zombieJ f1e9ff9
              
                chore: of it
              
              
                zombieJ 4a6925f
              
                chore: fill content
              
              
                zombieJ 2477daf
              
                chore: style
              
              
                zombieJ 1c2573d
              
                chore: style
              
              
                zombieJ e1c5e34
              
                chore: basic content
              
              
                zombieJ d954431
              
                chore: blur clear
              
              
                zombieJ b14de98
              
                chore: clear logic
              
              
                zombieJ 992b22d
              
                chore: fit logic
              
              
                zombieJ 012e64f
              
                chore: connect logic
              
              
                zombieJ d78b95f
              
                chore: fix logic
              
              
                zombieJ 70fa69f
              
                chore: fix logic
              
              
                zombieJ 9e32905
              
                chore: adjust omit position
              
              
                zombieJ 9e78943
              
                chore: adjust omit position
              
              
                zombieJ fe07192
              
                chore: adjust omit position
              
              
                zombieJ 85b64f7
              
                test: more test
              
              
                zombieJ 7f38025
              
                chore: test config
              
              
                zombieJ 3ca6f16
              
                chore: test config
              
              
                zombieJ f9e8a2c
              
                chore: adjust logic
              
              
                zombieJ 9a4d6d3
              
                chore: backfill
              
              
                zombieJ 8101a4c
              
                chore: lots of logic
              
              
                zombieJ fcc578d
              
                chore: lots of logic
              
              
                zombieJ d04df92
              
                chore: connect combobox
              
              
                zombieJ 341a834
              
                test: fix test
              
              
                zombieJ 3f538ab
              
                chore: add polit
              
              
                zombieJ 484c523
              
                chore: mv code
              
              
                zombieJ 0a18a4f
              
                chore: multiple
              
              
                zombieJ 1faca1f
              
                chore: multiple of it
              
              
                zombieJ 211f982
              
                chore: clean up
              
              
                zombieJ 5e712d1
              
                chore: fix logic
              
              
                zombieJ db75428
              
                chore: fix logic
              
              
                zombieJ c03a03e
              
                test: batch update
              
              
                zombieJ ef34813
              
                test: batch update
              
              
                zombieJ f71f4c5
              
                fix: display logic
              
              
                zombieJ afdf9c5
              
                fix: display logic
              
              
                zombieJ cf95331
              
                test: update snapshot
              
              
                zombieJ 0ed8ae6
              
                chore: more logic
              
              
                zombieJ 83cd06f
              
                chore: more
              
              
                zombieJ 2b14e52
              
                chore: more and more
              
              
                zombieJ c91c43b
              
                test: update snapshot
              
              
                zombieJ 8b2da80
              
                test: update snapshot
              
              
                zombieJ 27e7b2c
              
                test: base test
              
              
                zombieJ 04db275
              
                chore: update
              
              
                zombieJ de31413
              
                chore: update
              
              
                zombieJ 648f73d
              
                test: fix test
              
              
                zombieJ 3f98735
              
                chore: adjust cls
              
              
                zombieJ 30bdebe
              
                chore: multiple default search
              
              
                zombieJ 97bce99
              
                chore: of it
              
              
                zombieJ b606279
              
                chore: of it
              
              
                zombieJ 4649241
              
                test: all of multiple
              
              
                zombieJ 36220d3
              
                chore: clean up
              
              
                zombieJ e81f2f5
              
                chore: adjust logic
              
              
                zombieJ de3f3a6
              
                chore: replace components
              
              
                zombieJ a8ca6ec
              
                chore: support components
              
              
                zombieJ 0ca69af
              
                chore: of it
              
              
                zombieJ 370a165
              
                chore: new logic of passing
              
              
                zombieJ 8234174
              
                chore: fix input logic
              
              
                zombieJ 2cb9ad2
              
                test: fix test
              
              
                zombieJ 97ee306
              
                test: fix test
              
              
                zombieJ 7e86869
              
                chore: fix combobox logic
              
              
                zombieJ ff55f9a
              
                chore: fix ref
              
              
                zombieJ 250d0c8
              
                chore: all test
              
              
                zombieJ a8d598c
              
                chore: clean up
              
              
                zombieJ 7e2ffc6
              
                chore: clean up
              
              
                zombieJ d5f7692
              
                chore: clean up
              
              
                zombieJ 2facc4e
              
                chore: adjust import
              
              
                zombieJ 1428565
              
                chore: rm useless file
              
              
                zombieJ 41ccbca
              
                chore: clean up
              
              
                zombieJ fd508bd
              
                chore: clean up
              
              
                zombieJ be51de6
              
                test: coverage
              
              
                zombieJ ff308c8
              
                test: coverage
              
              
                zombieJ File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| @select-prefix: ~'rc-select'; | ||
| @import url('./patch.less'); | ||
| 
     | 
||
| * { | ||
| box-sizing: border-box; | ||
| 
          
            
          
           | 
    ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| // This is used for semantic refactoring | ||
| @import (reference) url('./index.less'); | ||
| 
     | 
||
| .@{select-prefix}.@{select-prefix} { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| user-select: none; | ||
| border: 1px solid blue; | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 移除或配置化硬编码的蓝色边框。 硬编码的  应用此差异移除硬编码边框:    display: inline-flex;
   align-items: center;
   user-select: none;
-  border: 1px solid blue;
   position: relative;或者使用变量: -  border: 1px solid blue;
+  border: @select-border-width @select-border-style @select-border-color;🤖 Prompt for AI Agents | 
||
| position: relative; | ||
| 
     | 
||
| // Content 部分自动占据剩余宽度 | ||
| .@{select-prefix}-content { | ||
| flex: auto; | ||
| display: flex; | ||
| align-items: center; | ||
| /* Prevent content from wrapping */ | ||
| min-width: 0; /* allow flex item to shrink */ | ||
| white-space: nowrap; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| position: relative; | ||
| } | ||
| 
     | 
||
| .@{select-prefix}-input { | ||
| border: none; | ||
| background: transparent; | ||
| } | ||
| 
     | 
||
| .@{select-prefix}-placeholder { | ||
| opacity: 0.5; | ||
| 
     | 
||
| &::after { | ||
| content: '\00a0'; // nbsp placeholder | ||
| width: 0; | ||
| overflow: hidden; | ||
| } | ||
| } | ||
| 
     | 
||
| .@{select-prefix}-content, | ||
| .@{select-prefix}-input, | ||
| .@{select-prefix}-placeholder { | ||
| padding: 0; | ||
| margin: 0; | ||
| line-height: 1.5; | ||
| font-size: 14px; | ||
| font-weight: normal; | ||
| } | ||
| 
     | 
||
| // 其他部分禁止自动宽度,使用内容宽度 | ||
| .@{select-prefix}-prefix, | ||
| .@{select-prefix}-suffix, | ||
| .@{select-prefix}-clear { | ||
| flex: none; | ||
| } | ||
| 
     | 
||
| .@{select-prefix}-clear { | ||
| position: absolute; | ||
| top: 0; | ||
| right: 0; | ||
| } | ||
| 
     | 
||
| // ============================= Single ============================= | ||
| &-single { | ||
| .@{select-prefix}-input { | ||
| position: absolute; | ||
| inset: 0; | ||
| } | ||
| } | ||
| 
     | 
||
| // ============================ Multiple ============================ | ||
| &-multiple { | ||
| .@{select-prefix}-selection-item { | ||
| background: rgba(0, 0, 0, 0.1); | ||
| border-radius: 8px; | ||
| margin-right: 4px; | ||
| } | ||
| 
     | 
||
| .@{select-prefix}-input { | ||
| width: calc(var(--select-input-width, 10) * 1px); | ||
| min-width: 4px; | ||
| } | ||
| } | ||
| } | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| module.exports = { | ||
| setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'], | ||
| collectCoverage: true, | ||
| collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}'], | ||
| }; | 
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
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.
Using a duplicated class selector (
.@{select-prefix}.@{select-prefix}) to increase specificity can be a bit of a hack and might make the CSS harder to maintain. If this is necessary to override existing styles, please add a comment explaining why. A better long-term solution might be to refactor the base styles to avoid needing such high specificity.