Skip to content

Commit 3d729b7

Browse files
authored
Merge branch 'master' into feature/import
2 parents 18d0924 + ab6fd60 commit 3d729b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+835
-767
lines changed

.github/build/Makefile.show-help.mk

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DEFAULT_GOAL := show-help
2+
# See <https://gist.github.com/klmr/575726c7e05d8780505a> for explanation.
3+
.PHONY: show-help
4+
show-help:
5+
@echo "$$(tput bold)Please specify a build target. The choices are:$$(tput sgr0)";echo;sed -ne"/^## /{h;s/.*//;:d" -e"H;n;s/^## //;td" -e"s/:.*//;G;s/\\n## /---/;s/\\n/ /g;p;}" ${MAKEFILE_LIST}|LC_ALL='C' sort -f|awk -F --- -v n=$$(tput cols) -v i=19 -v a="$$(tput setaf 6)" -v z="$$(tput sgr0)" '{printf"%s%*s%s ",a,-i,$$1,z;m=split($$2,w," ");l=n-i;for(j=1;j<=m;j++){l-=length(w[j])+1;if(l<= 0){l=n-i-length(w[j])-1;printf"\n%*s ",-i," ";}printf"%s ",w[j];}printf"\n";}'|more $(shell test $(shell uname) == Darwin && echo '-Xr')

.github/workflows/build-and-preview-site.yml

-34
This file was deleted.

.github/workflows/multi-platform.yml

-120
This file was deleted.

.github/workflows/node-checks.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ jobs:
2626
node-version: ${{ matrix.node-version }}
2727

2828
- name: Install Dependencies
29-
run: npm install
29+
run: make setup
3030

3131
- name: Lint Check
32-
run: npm run lint
32+
run: make lint
3333

3434
- name: Prettier Check
35-
run: npm run format:check
35+
run: make format-check
3636

3737
- name: Build Project
38-
run: npm run build
38+
run: make build
3939

4040
- name: Run Tests
41-
run: npm run test
41+
run: make tests
4242

4343
- name: Log Node.js Version
4444
run: echo "Tested on Node.js version ${{ matrix.node-version }}"

CONTRIBUTING.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Users can now test their code on their local machine against the CI checks imple
106106
To test code changes on your local machine, run the following command:
107107

108108
```
109-
make run-tests
109+
make tests
110110
```
111111

112112
#### Building Docker image
@@ -117,10 +117,18 @@ To build a Docker image of the project, please ensure you have `Docker` installe
117117
make docker
118118
```
119119

120+
You can also refer to this "<a href="https://www.youtube.com/live/lsw9KA__iu4?si=o8gpZdSHcqO2OKxE">Training: contributing to Sistent</a>" and this <a href="https://www.youtube.com/live/yiXkxbibLUU?si=Dybj5qr0VLhLWEpl">Websites call</a> where experienced contributors have taught how to use sistent in your project or Meshery
121+
120122
### UI Lint Rules
121123

122124
Layer5 uses ES-Lint to maintain code quality & consistency in our UI Code.
123125

126+
Run the following command before commiting the changes:
127+
128+
```
129+
make lint
130+
```
131+
124132
# <a name="maintaining"> Reviews</a>
125133

126134
All contributors are invited to review pull requests. See this short video on [how to review a pull request](https://www.youtube.com/watch?v=isLfo7jfE6g&feature=youtu.be).

Makefile

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1-
.PHONY: setup build format-check format-fix
1+
include .github/build/Makefile.show-help.mk
22

3-
## Install Sistent dependencies your local machine.
4-
package-setup:
3+
.PHONY: setup build format-check format-fix lint
4+
5+
## Install Sistent dependencies on your local machine
6+
setup:
57
npm install
68

7-
## Build Sistent components and packages on your local machine.
8-
package-build: setup
9+
## Build Sistent components and packages on your local machine
10+
build:
911
npm run build
1012

11-
package-build-watch: setup
13+
## Buid Sistent in watch mode
14+
build-watch:
1215
npm run build:watch
1316

14-
package-format-check:
17+
## Check code formatting
18+
format-check:
1519
npm run format:check
1620

17-
package-format-fix:
21+
## Fix formatting and run Eslint on your local machine
22+
lint:
1823
npm run format:write
24+
npm run lint
25+
26+
## Run tests
27+
tests:
28+
npm run test
1929

2030
.PHONY: version-patch version-minor version-major
2131

@@ -27,6 +37,6 @@ version-patch:
2737
version-minor:
2838
npm run versionup:minor
2939

30-
# Create a major versio of packages
40+
# Create a major version of packages
3141
version-major:
3242
npm run versionup:major

README.md

+20-13
Original file line numberDiff line numberDiff line change
@@ -37,37 +37,44 @@ Make sure you have `npm` on `node@16` and above. The CI workflows checks for in
3737

3838
To set up the project, run the following command to install dependencies:
3939

40-
Please note that at this time, `npm install` will also build the project as the first step. This is to ensure that this is building correctly before moving to a task.
40+
```
41+
make setup
42+
```
43+
44+
To test the sistent component locally, you can run:
45+
46+
```
47+
make build
48+
```
49+
50+
If you wish to build in watch mode:
4151

4252
```
43-
setup:
44-
npm install
53+
make watchmode-build
4554
```
4655

4756
To check if your code meets the formatting standards, you can run:
4857

4958
```
50-
format-check:
51-
npm run format:check
59+
make format-check
5260
```
5361

54-
To automatically fix formatting issues, you can run
62+
To run Eslint:
5563

5664
```
57-
format-fix:
58-
npm run format:write
65+
make lint
5966
```
6067

61-
To test the sistent component locally, you can run
68+
To run tests:
6269

6370
```
64-
build:
65-
npm run build
71+
make tests
6672
```
6773

74+
To attach sistent to your project use:
75+
6876
```
69-
attach sistent to your project:
70-
npm install <path-to-sistent-on-local-machine>
77+
npm install <path-to-sistent-on-local-machine>
7178
```
7279

7380
> [!NOTE]

examples/next-12/components/ResponsiveDataTable/ResponsiveDataTable.jsx

+2-9
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function ResponsiveDataTable({ data, columns, options = {}, ...props }) {
1313
year: 'numeric'
1414
};
1515

16-
return new Intl.DateTimeFormat('en-US', dateOptions).format(date);
16+
return new Intl.DateTimeFormat('un-US', dateOptions).format(date);
1717
};
1818

1919
const updatedOptions = {
@@ -37,21 +37,14 @@ export function ResponsiveDataTable({ data, columns, options = {}, ...props }) {
3737
break;
3838
}
3939
}
40-
},
41-
filter: true,
42-
sort: true,
43-
responsive: 'standard',
44-
serverSide: false,
40+
}
4541
};
4642

4743
useEffect(() => {
4844
columns?.forEach((col) => {
4945
if (!col.options) {
5046
col.options = {};
5147
}
52-
53-
col.options.sort = true;
54-
col.options.filter = true;
5548
col.options.display = columnVisibility[col.name];
5649

5750
if (

0 commit comments

Comments
 (0)