devtools icon indicating copy to clipboard operation
devtools copied to clipboard

feat: add directives page

Open userquin opened this issue 1 year ago โ€ข 3 comments

๐Ÿ”— Linked issue

โ“ Type of change

  • [ ] ๐Ÿ“– Documentation (updates to the documentation or readme)
  • [ ] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [x] ๐Ÿ‘Œ Enhancement (improving an existing functionality)
  • [x] โœจ New feature (a non-breaking change that adds functionality)
  • [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

Check the title: https://github.com/nuxt/nuxt/pull/29203

This PR includes:

  • filter out directive imports in imports.vue page: Nuxt will use import.ts module to auto import and generate the dts
  • filter directive imports in directives.vue page
  • updated NSectionBlock.vue to allow add the directives when there are no directives (added expandable prop and the logic for mouse and expand icon)
  • add directives.md to the docs: will require a review

This PR can be merged, we only need to confirm that Nuxt will use the import.ts module, otherwise we will need to redo some logic here.

Some screenshots

GYg7Tc1WgAA1e5s toolbar_

GYg7e2JXQAAugEt directives page

userquin avatar Sep 27 '24 22:09 userquin

Can we have it in the imports tab (as a badge or filter) instead? Would that be easier to maintain?

antfu avatar Sep 28 '24 00:09 antfu

Something like this?

imagen

userquin avatar Sep 28 '24 10:09 userquin

We need to:

  • [x] make new filter responsive
  • [x] change User composables to User directives and the icon when directives filter is checked.
  • [x] use v-<kebab-case> in copy button
  • [ ] review used/unused directives: looks like we need to change how we collect the info for the directives (right now directives always shown as not-used): found the problem, we're using 2 different unimport context in Nuxt (I'm going to check required changes in Nuxt PR)

userquin avatar Sep 28 '24 11:09 userquin