Skip to content

Commit 1281028

Browse files
committed
feat: update README and enhance Vue Query page styling
1 parent 01f1463 commit 1281028

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
[![License][license-src]][license-href]
66
[![Nuxt][nuxt-src]][nuxt-href]
77

8-
Nuxt Query is a module for integrating [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview) into your Nuxt application, providing a powerful solution for fetching, caching, synchronizing and updating server state.
8+
Nuxt Query is a module for integrating [Tanstack Query](https://tanstack.com/query/latest/docs/framework/vue/overview) (formerly known as Vue Query) into your Nuxt application, providing a powerful solution for fetching, caching, synchronizing and updating server state.
99

1010
- [ Release Notes](/CHANGELOG.md)
11-
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/nuxt-query?file=playground%2Fapp.vue) -->
12-
<!-- - [📖 &nbsp;Documentation](https://example.com) -->
1311

1412
## Features
1513

@@ -35,7 +33,7 @@ To configure Nuxt Query, update your `nuxt.config.ts` specifying the options you
3533
```typescript
3634
// nuxt.config.ts
3735
export default defineNuxtConfig({
38-
modules: ['nuxt-query'],
36+
modules: ['@peterbud/nuxt-query'],
3937
nuxtQuery: {
4038
// Specify which Vue Query composable(s) to auto-import
4139
autoImports: ['useQuery', 'useMutation'],
@@ -112,6 +110,10 @@ export default defineNuxtPlugin({
112110
})
113111
```
114112

113+
## Nuxt DevTools Integration
114+
115+
Nuxt Query integrates with Nuxt DevTools to provide a dedicated tab for Vue Query, where you can inspect the state of your queries, view their cache, and properties, initiate refetch or remove certain queries and more.
116+
115117
## Contribution
116118

117119
<details>
@@ -125,7 +127,7 @@ export default defineNuxtPlugin({
125127
npm run dev:prepare
126128

127129
# Develop with the playground
128-
npm run dev
130+
npm run dev:client
129131

130132
# Build the playground
131133
npm run dev:build
@@ -137,6 +139,9 @@ export default defineNuxtPlugin({
137139
npm run test
138140
npm run test:watch
139141

142+
# Build the module
143+
npm run build
144+
140145
# Release new version
141146
npm run release
142147
```

client/app/pages/vue-query.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import { useDevtoolsClient } from '@nuxt/devtools-kit/iframe-client'
33
import type { Query, QueryCacheNotifyEvent, QueryClient } from '@tanstack/vue-query'
4+
import 'splitpanes/dist/splitpanes.css'
45
56
const searchString = ref('')
67
const queries = ref(new Array<Query>())
@@ -117,6 +118,7 @@ function handleRestoreTriggerError(query: Query) {
117118
<NNavbar
118119
v-model:search="searchString"
119120
class="pb2"
121+
:style="{ 'border-bottom': '1px solid rgba(128,128,128, 0.8)' }"
120122
>
121123
<div class="flex gap-1 text-sm">
122124
<span op50>{{ queries?.length }} queries in total</span>
@@ -176,7 +178,7 @@ function handleRestoreTriggerError(query: Query) {
176178
@click="handleRestoreTriggerError(toRaw(selectedQuery) as Query)"
177179
/>
178180
</template>
179-
<div class="grid grid-cols-[auto_1fr] gap-1 px-2 py-2 b-1 b-solid b-gray-200">
181+
<div class="grid grid-cols-[auto_1fr] gap-1 px-2 py-2">
180182
<div>
181183
<strong>Query Key:</strong>
182184
</div>
@@ -228,7 +230,7 @@ function handleRestoreTriggerError(query: Query) {
228230
text="Query Details"
229231
:padding="true"
230232
>
231-
<div class="grid grid-cols-[auto_1fr] gap-1 px-2 py-2 b-1 b-solid b-gray-200">
233+
<div class="grid grid-cols-[auto_1fr] gap-1 px-2 py-2">
232234
<div><strong>Status:</strong></div>
233235
<div>
234236
{{ selectedQuery.state.status }}
@@ -285,3 +287,9 @@ function handleRestoreTriggerError(query: Query) {
285287
</template>
286288
</NSplitPane>
287289
</template>
290+
291+
<style>
292+
.splitpanes__splitter {
293+
border-color: rgba(128,128,128, 0.8);
294+
}
295+
</style>

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"@tanstack/vue-query": "^5.66.0",
7+
"splitpanes": "^3.1.8",
78
"vue-json-pretty": "^2.4.0"
89
}
910
}

pnpm-lock.yaml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)