Skip to content

feat: add directives page#740

Merged
antfu merged 13 commits into
nuxt:mainfrom
userquin:feat-add-directives-page
Feb 6, 2025
Merged

feat: add directives page#740
antfu merged 13 commits into
nuxt:mainfrom
userquin:feat-add-directives-page

Conversation

@userquin

@userquin userquin commented Sep 27, 2024

Copy link
Copy Markdown
Member

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ 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: nuxt/nuxt#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

@antfu

antfu commented Sep 28, 2024

Copy link
Copy Markdown
Member

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

@userquin

Copy link
Copy Markdown
Member Author

Something like this?

imagen

@userquin

userquin commented Sep 28, 2024

Copy link
Copy Markdown
Member Author

We need to:

  • make new filter responsive
  • change User composables to User directives and the icon when directives filter is checked.
  • 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 userquin deleted the feat-add-directives-page branch February 6, 2025 19:35
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.

2 participants