Skip to content

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Jul 29, 2020

Resolves #67. Despite the documentation, we were not properly resolving component names from nested directories resulting in duplicate names. This PR is probably introducing regression in usage for current users so would be probably introduce at least as feat.

components/form/input/text.vue

  • Previously: <InputText>
  • Now: <FormInputText>

@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #81 (31e07ff) into main (9193efb) will increase coverage by 0.31%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
+ Coverage   86.12%   86.44%   +0.31%     
==========================================
  Files           7        7              
  Lines         173      177       +4     
  Branches       46       48       +2     
==========================================
+ Hits          149      153       +4     
  Misses         24       24              
Impacted Files Coverage Δ
test/fixture/nuxt.config.ts 25.00% <ø> (ø)
test/unit/utils.ts 100.00% <ø> (ø)
src/scan.ts 98.36% <100.00%> (+0.11%) ⬆️

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 9193efb...76a3dac. Read the comment docs.

@pi0 pi0 requested review from atinux and kevinmarrec July 29, 2020 14:54
@pi0 pi0 changed the title feat: properly resolve components in nested dirs feat: properly prefix components in nested dirs Jul 29, 2020
@pi0 pi0 marked this pull request as draft July 29, 2020 15:01
@kevinmarrec
Copy link
Contributor

@pi0 I thought we didn't want to prefix nested dirs when no duplicated components have been found in other components paths, no ?

@pi0
Copy link
Member Author

pi0 commented Jul 29, 2020

@kevinmarrec Yes we do warn about duplicated names. Also, it is better that people using distinct names for components (like <LayoutFormTextArea> to avoid conflicts.

This PR is to prefix properly for nested dirs like we currently automatically for one level only :)

To de-prefix, we can specify sub-dirs in config.

@pi0 pi0 marked this pull request as ready for review July 29, 2020 16:01
@kevinmarrec
Copy link
Contributor

@pi0 Hum.. for my project at work our components have each a folder with same name that contains .vue and .scss, it's just gonna be a PINA for us 😅😂

@pi0
Copy link
Member Author

pi0 commented Jul 29, 2020

@kevinmarrec Actually multifile is still supported to split components :D But seems it is going to be a breaking change. Will move behind a flag for 1.x.

Copy link
Member

@atinux atinux left a comment

Choose a reason for hiding this comment

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

Agree to merge behind a flag to start :)

@atinux
Copy link
Member

atinux commented Jul 30, 2020

Might be nice to update the documentation I suppose

Copy link
Contributor

@kevinmarrec kevinmarrec left a comment

Choose a reason for hiding this comment

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

I'm good for the flag :)

@drewbaker
Copy link

Would love to see this merged!

@drewbaker
Copy link

@pi0 whats happening with this? Any reason it hasn't been merged yet?

@atinux
Copy link
Member

atinux commented Nov 20, 2020

@drewbaker we did not merge it yet because it is actually a breaking change and will have to be a major version 😬

@pi0 pi0 changed the title feat: properly prefix components in nested dirs feat!: properly prefix components in nested dirs Nov 23, 2020
Base automatically changed from master to main February 10, 2021 12:25
@pi0 pi0 changed the title feat!: properly prefix components in nested dirs feat!: prefix components in nested dirs with full path Feb 10, 2021
@pi0 pi0 merged commit 84a5de7 into main Feb 10, 2021
@pi0 pi0 deleted the feat/nested-dir branch February 10, 2021 13:14
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.

Auto prefex component name from parent directories

5 participants