Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

66 changes: 0 additions & 66 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install dev dependencies
run: yarn --frozen-lockfile
- name: Run style check
run: yarn lint && yarn prettier-check
run: yarn lint && yarn format:check
cypress_no_meilisearch:
runs-on: ubuntu-latest
container:
Expand Down
18 changes: 18 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"printWidth": 80,
"sortPackageJson": false,
"ignorePatterns": [
"build/",
"data.ms/",
"assets/",
"public/",
"node_modules/",
".github/",
".storybook/"
]
}
27 changes: 27 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"env": {
"browser": true,
"es2021": true,
"node": true
},
"ignorePatterns": [
"build/",
"data.ms/",
"public/",
"node_modules/",
"build/*",
"src/components/icons/*"
],
"plugins": ["react"],
"rules": {
"no-console": "warn",
"react/display-name": "off",
"react/exhaustive-deps": "off",
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
"react/jsx-no-constructed-context-values": "error",
"react/jsx-no-useless-fragment": "off",
"react/jsx-props-no-spreading": "off",
"react/no-array-index-key": "off"
}
}
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["oxc.oxc-vscode"]
}
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"oxc.enable.oxfmt": false,
"oxc.enable.oxlint": true,
"oxc.path.oxlint": "./node_modules/.bin/oxlint",
"oxc.fmt.configPath": ".oxfmtrc.json",
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true
}
28 changes: 14 additions & 14 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.6.0.cjs

packageExtensions:
"@storybook/addon-actions@*":
'@storybook/addon-actions@*':
dependencies:
dequal: "^2.0.3"
polished: "^4.3.1"
"@storybook/addon-backgrounds@*":
dequal: '^2.0.3'
polished: '^4.3.1'
'@storybook/addon-backgrounds@*':
dependencies:
memoizerific: "^1.11.3"
ts-dedent: "^2.2.0"
"@storybook/addon-controls@*":
memoizerific: '^1.11.3'
ts-dedent: '^2.2.0'
'@storybook/addon-controls@*':
dependencies:
"@storybook/global": "^5.0.0"
dequal: "^2.0.3"
ts-dedent: "^2.2.0"
"@storybook/addon-docs@*":
'@storybook/global': '^5.0.0'
dequal: '^2.0.3'
ts-dedent: '^2.2.0'
'@storybook/addon-docs@*':
dependencies:
"@storybook/blocks": "^8.6.14"
"@storybook/addon-viewport@*":
'@storybook/blocks': '^8.6.14'
'@storybook/addon-viewport@*':
dependencies:
memoizerific: "^1.11.3"
memoizerific: '^1.11.3'
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ We accept the use of AI-powered tools (GitHub Copilot, ChatGPT, Claude, Cursor,
⚠️ However, transparency is required: if you use AI assistance, please mention it in your PR description. This helps maintainers during code review and ensure the quality of contributions.

What we expect:

- **Disclose AI usage**: A simple note like "Used GitHub Copilot for autocompletion" or "Generated initial test structure with ChatGPT" is sufficient.
- **Specify the scope**: Indicate which parts of your contribution involved AI assistance.
- **Review AI-generated content**: Ensure you understand and have verified any AI-generated code before submitting.
Expand Down Expand Up @@ -132,6 +133,7 @@ The `mini-dashboard` is part of the Meilisearch engine's binary. In order for th
- Make a PR on [`meilisearch`](https://github.com/meilisearch/meilisearch/), with the changes pointing to the required branch (see step 2).

During a `pre-release` of [`meilisearch`](https://github.com/meilisearch/meilisearch/), an additional step is required before publishing the mini-dashboard:

- If there are breaking changes on the search, update the version of `meilisearch-js` and `instant-meilisearch` to their latest compatible version with the pre-release. It may be a [beta](https://github.com/meilisearch/mini-dashboard/pull/322/files) or the latest release. Check with the [integration-team](https://github.com/meilisearch/integrations-guides/) to know if it is required or not.

<hr>
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

🚨 IMPORTANT NOTICE: Reduced Maintenance & Support 🚨

*Dear Community,*
_Dear Community,_

*We'd like to share some updates regarding the future maintenance of this repository:*
_We'd like to share some updates regarding the future maintenance of this repository:_

*Our team is small, and our availability will be reduced in the upcoming times. As such, response times might be slower, and we will not be accepting enhancements for this repository moving forward.*
_Our team is small, and our availability will be reduced in the upcoming times. As such, response times might be slower, and we will not be accepting enhancements for this repository moving forward._

*If you're looking for reliable alternatives, consider using [Meilisearch Cloud](https://meilisearch.com/cloud?utm_campaign=oss&utm_source=github&utm_medium=minidashboard). For instance, it offers a convenient solution for managing your index settings.*
_If you're looking for reliable alternatives, consider using [Meilisearch Cloud](https://meilisearch.com/cloud?utm_campaign=oss&utm_source=github&utm_medium=minidashboard). For instance, it offers a convenient solution for managing your index settings._

*Seeking immediate support? Please join us on [our Discord server](https://discord.meilisearch.com).*
_Seeking immediate support? Please join us on [our Discord server](https://discord.meilisearch.com)._

---

Expand Down
1 change: 0 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const { defineConfig } = require('cypress')

module.exports = defineConfig({
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/test-api-key-query-param.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable cypress/no-unnecessary-waiting */
const API_KEY = Cypress.env('apiKey')
const WAITING_TIME = Cypress.env('waitingTime')

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/test-api-key-required.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable cypress/no-unnecessary-waiting */
const API_KEY = Cypress.env('apiKey')
const WRONG_APIKEY = Cypress.env('wrongApiKey')
const WAITING_TIME = Cypress.env('waitingTime')
Expand Down
13 changes: 5 additions & 8 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const { MeiliSearch: Meilisearch } = require('meilisearch')
/* oxlint-disable no-console */
const { Meilisearch } = require('meilisearch')

const { apiKey, host } = Cypress.env()

Expand All @@ -11,8 +11,7 @@ Cypress.Commands.add('deleteAllIndexes', async () => {
})
const { results: indexes } = await client.getIndexes()
indexes.forEach(async (index) => {
const task = await client.deleteIndex(index.uid)
await client.waitForTask(task.taskUid)
await client.deleteIndex(index.uid).waitTask()
})
} catch (e) {
console.log({ e })
Expand All @@ -25,8 +24,7 @@ Cypress.Commands.add('createIndex', async (uid) => {
host,
apiKey,
})
const task = await client.createIndex(uid)
await client.waitForTask(task.taskUid)
await client.createIndex(uid).waitTask()
} catch (e) {
console.log({ e })
}
Expand All @@ -39,8 +37,7 @@ Cypress.Commands.add('addDocuments', async (uid, documents) => {
apiKey,
})
const index = await client.getIndex(uid)
const task = await index.addDocuments(documents)
await client.waitForTask(task.taskUid)
await index.addDocuments(documents).waitTask()
} catch (e) {
console.log({ e })
}
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta name="robots" content="noindex" />
Expand Down
59 changes: 26 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
{
"name": "mini-dashboard",
"version": "0.4.1",
"version": "0.4.2",
"private": true,
"dependencies": {
"@meilisearch/instant-meilisearch": "0.30",
"@styled-system/should-forward-prop": "^5.1.5",
"color": "^5.0.3",
"dotenv": "^17.2.4",
"eslint-plugin-import": "^2.29.1",
"meilisearch": "0.48.2",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-instantsearch-dom": "^6.40.4",
"react-json-view": "^1.21.3",
"react-lazy-load-image-component": "^1.6.3",
"reakit": "^1.3.11",
"styled-components": "^5.3.9",
"styled-system": "^5.1.5"
},
"scripts": {
"validate-env": "node validate-env.js",
"prestart": "yarn validate-env",
Expand All @@ -27,9 +10,9 @@
"dev:ci": "yarn prestart && VITE_MEILI_SERVER_ADDRESS=http://meilisearch:7700 vite --host 0.0.0.0 --port 3000",
"build": "yarn prebuild && vite build",
"preview": "vite preview --host 0.0.0.0 --port 3000",
"lint": "eslint .",
"prettier-check": "prettier --check ./src",
"format:fix": "prettier --write ./src",
"lint": "oxlint .",
"format:check": "oxfmt --check .",
"format:fix": "oxfmt --fix .",
"test": "vitest",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand All @@ -39,9 +22,22 @@
"cy:run": "cypress run --config excludeSpecPattern=['**/*/test-no-meilisearch.cy.js','**/*/test-api-key-required.cy.js','**/*/test-api-key-query-param.cy.js']",
"icons": "npx @svgr/cli --title-prop --no-dimensions --replace-attr-values \"#39486E=currentColor,#959DB3=currentColor\" -d src/components/icons src/components/icons/svg"
},
"browserslist": [
"defaults"
],
"dependencies": {
"@meilisearch/instant-meilisearch": "0.31.1",
"@styled-system/should-forward-prop": "^5.1.5",
"color": "^5.0.3",
"dotenv": "^17.2.4",
"meilisearch": "0.57.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-instantsearch-dom": "^6.40.4",
"react-json-view": "^1.21.3",
"react-lazy-load-image-component": "^1.6.3",
"reakit": "^1.3.11",
"styled-components": "^5.3.9",
"styled-system": "^5.1.5"
},
"devDependencies": {
"@storybook/addon-actions": "^8.6.15",
"@storybook/addon-backgrounds": "^9.0.8",
Expand All @@ -61,16 +57,10 @@
"@vitejs/plugin-react": "^4.4.1",
"cypress": "^14.5.3",
"dequal": "^2.0.3",
"eslint": "8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-cypress": "^4.2.0",
"eslint-plugin-jsx-a11y": "^6.7.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"jsdom": "^28.0.0",
"memoizerific": "^1.11.3",
"oxfmt": "^0.46.0",
"oxlint": "^1.60.0",
"polished": "^4.3.1",
"prettier": "^3.8.1",
"storybook": "^10.2.13",
Expand All @@ -87,5 +77,8 @@
"@storybook/core/esbuild": "^0.25.0",
"js-yaml": "^4.1.1",
"qs": "^6.14.1"
}
},
"browserslist": [
"defaults"
]
}
6 changes: 3 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable react/jsx-no-constructed-context-values */
/* eslint-disable no-console */
/* oxlint-disable react/jsx-no-constructed-context-values */
/* oxlint-disable no-console */
import React, { useState, useEffect, useCallback } from 'react'
import styled from 'styled-components'
import { instantMeiliSearch as instantMeilisearch } from '@meilisearch/instant-meilisearch'
import { useDialogState } from 'reakit/Dialog'
import { MeiliSearch as Meilisearch } from 'meilisearch'
import { Meilisearch } from 'meilisearch'

import ApiKeyContext from 'context/ApiKeyContext'
import { useMeilisearchClientContext } from 'context/MeilisearchClientContext'
Expand Down Expand Up @@ -64,7 +64,7 @@
useEffect(() => {
try {
window.localStorage.removeItem('apiKey')
} catch (_) {

Check warning on line 67 in src/App.jsx

View workflow job for this annotation

GitHub Actions / linter-check

eslint(no-unused-vars)

Catch parameter '_' is caught but never used.
// ignore errors when clearing apiKey
}
}, [])
Expand Down
Loading
Loading