Skip to content

Commit 7188d2a

Browse files
authored
feat: Add missing files to the package
1 parent 8a936b1 commit 7188d2a

File tree

7 files changed

+314
-18
lines changed

7 files changed

+314
-18
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test Suite
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
test-and-build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [16.x]
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
with:
17+
ref: ${{ github.event.pull_request.head.sha }}
18+
fetch-depth: 0
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Linting
29+
run: npm run eslint
30+
31+
- name: Run tests
32+
run: npm run test
33+
34+
- name: Build
35+
run: npm run build
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ReleaseType:
7+
description: 'Release Type'
8+
required: true
9+
default: 'warning'
10+
type: choice
11+
options:
12+
- Major
13+
- Feature
14+
- Bug
15+
16+
jobs:
17+
update-and-publish:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v2
25+
with:
26+
node-version: 16.x
27+
scope: '@keyvaluesystems'
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Run tests
33+
run: npm run test
34+
35+
- name: 'Set release type : ${{ inputs.ReleaseType }}'
36+
id: release_type
37+
uses: ASzc/change-string-case-action@v5
38+
with:
39+
string: ${{ inputs.ReleaseType }}
40+
41+
- name: Extract Current Branch and Validate
42+
id: get_current_branch
43+
shell: bash
44+
run: |
45+
BRANCH="${GITHUB_REF#refs/heads/}"
46+
if [ "$BRANCH" == 'master' ]
47+
then
48+
echo "Branch validation Successful"
49+
else
50+
echo "Releases only taken from master branch"
51+
exit 1
52+
fi
53+
54+
- name: Get Latest version from package.json
55+
run: |
56+
# Get the latest version from package.json
57+
LATEST_VERSION=$(node -p "require('./package.json').version")
58+
59+
# Output the latest version as a workflow env
60+
echo "latest_version=$LATEST_VERSION" >> $GITHUB_ENV
61+
62+
- name: Get new version
63+
id: get_next_version
64+
uses: christian-draeger/[email protected]
65+
with:
66+
current-version: ${{ env.latest_version }}
67+
version-fragment: ${{ steps.release_type.outputs.lowercase }}
68+
69+
- name: Update version in package.json and package-lock.json
70+
run: |
71+
OLD_VERSION=${{ env.latest_version }}
72+
NEW_VERSION=${{ steps.get_next_version.outputs.next-version }}
73+
74+
npm version $NEW_VERSION --no-git-tag-version
75+
git config user.name github-actions
76+
git config user.email [email protected]
77+
git add package.json package-lock.json
78+
git commit -m "Bump version from $OLD_VERSION to $NEW_VERSION"
79+
git push origin HEAD:master
80+
81+
- name: Build Package
82+
run: npm run build
83+
84+
- name: Publish package
85+
run: npm publish --access public --//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
86+
if: success()
87+
88+
- name: Revert package.json and package-lock.json
89+
run: |
90+
# Revert package.json and package-lock.json to the previous version
91+
npm version ${{ env.latest_version }} --no-git-tag-version
92+
git commit -am "Revert to version ${{ env.latest_version }}"
93+
git push origin HEAD:master
94+
if: failure()
95+
96+
- name: Create GitHub release
97+
if: success()
98+
uses: actions/create-release@v1
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
with:
102+
tag_name: v${{ steps.get_next_version.outputs.next-version }}
103+
release_name: Release v${{ steps.get_next_version.outputs.next-version }}
104+
# body: Release ${{ env.NEW_VERSION }}
105+
draft: false
106+
prerelease: false

.npmrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
legacy-peer-deps=true
2-
@vivekthebassist:registry=https://registry.npmjs.org/
3-
access=public

CODE_OF_CONDUCT.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at [email protected]. All
58+
reported by contacting the project team at [email protected]. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Francisco Hodge
3+
Copyright (c) 2025 keyvalue software systems
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

PULL_REQUEST_TEMPLATE.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<!-- Thank you for contributing to @keyvaluesystems/react-multi-level-table! -->
2+
<!-- Before submitting a pull request, please review our contributing guidelines. -->
3+
4+
5+
6+
## Pull Request Checklist
7+
8+
9+
10+
- [ ] **Read the contributing guidelines.**
11+
- [ ] **Linked to an issue:** Fixes # (replace with the issue number, if applicable)
12+
- [ ] **Branch is up-to-date with the base branch:** `master`
13+
- [ ] **Changes pass tests locally:** `npm test` or `yarn test`
14+
- [ ] **Documentation has been updated, if necessary**
15+
- [ ] **Code follows the style guide of the project**
16+
17+
18+
## Description
19+
20+
21+
22+
<!-- Provide a brief description of your changes. -->
23+
24+
25+
26+
## Screenshots (if applicable)
27+
28+
29+
30+
<!-- Add screenshots or GIFs to help explain your changes. -->
31+
32+
33+
34+
## Additional Notes
35+
36+
37+
38+
<!-- Any additional information you want to provide that is not covered by the checklist or description. -->
39+
40+
41+
42+
## Related Issues or PRs
43+
44+
45+
46+
<!-- If your pull request is related to any issue(s) or other pull request(s), mention them here. -->
47+
48+
49+
50+
## Reviewer Guidelines
51+
52+
53+
54+
<!-- Suggest specific areas of the codebase that you would like the reviewer to focus on. -->
55+
56+
57+
58+
## Testing Instructions
59+
60+
61+
62+
<!-- Provide step-by-step instructions on how to test your changes. -->
63+
64+
65+
66+
## Checklist for Reviewers
67+
68+
69+
70+
- [ ] Code follows project conventions and style
71+
- [ ] Changes do not introduce new warnings or errors
72+
- [ ] Unit tests cover the changes
73+
- [ ] Documentation is updated
74+
75+
76+
## By submitting this pull request, I confirm that my contribution is made under the terms of the MIT License.

STYLE_GUIDELINES.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
## Style Guidelines for @keyvaluesystems/react-multi-level-table
2+
3+
**Introduction**
4+
5+
As an open-source React table component built with Material-UI, @keyvaluesystems/react-multi-level-table aims to provide a consistent and maintainable codebase. These style guidelines serve as a reference for contributors, ensuring that the component's styling adheres to established conventions and best practices.
6+
7+
**Coding Conventions**
8+
9+
1. **Component Structure**
10+
- Organize CSS files into a logical structure.
11+
- Use meaningful and descriptive names for classes.
12+
- Include comments to explain non-obvious logic and complex styles.
13+
- Should support devices with all resolutions
14+
- Follow CamelCase conventions for class names that concisely convey their purpose, enhancing code organization and readability
15+
- Adhere to the practice of reusing style classes to improve code organization and maintainability.
16+
17+
2. **Material-UI Integration**
18+
- Leverage Material-UI's theme system for consistent styling
19+
- Use theme variables for colors, spacing, and typography
20+
- Maintain compatibility with Material-UI's design principles
21+
- Utilize Material-UI's built-in components and styling solutions when possible
22+
23+
3. **Responsive Design**
24+
- Ensure the table component works across all device sizes
25+
- Use Material-UI's responsive utilities (useMediaQuery, breakpoints)
26+
- Implement appropriate spacing and sizing for different screen sizes
27+
- Test table responsiveness across common breakpoints
28+
29+
4. **Accessibility**
30+
- Maintain sufficient color contrast ratios
31+
- Ensure keyboard navigation support
32+
- Include appropriate ARIA attributes
33+
- Support screen readers with proper semantic markup
34+
35+
5. **Performance**
36+
- Optimize CSS-in-JS styles to prevent unnecessary re-renders
37+
- Use CSS-in-JS composition to reduce style duplication
38+
- Implement proper memoization for styled components
39+
- Keep styles modular and scoped to prevent style conflicts
40+
41+
**Documentation Practices**
42+
43+
1. **Style Documentation**
44+
- Document custom theme overrides and their purpose
45+
- Include examples of style customization in the README
46+
- Provide clear documentation for style-related props
47+
- Maintain a style guide in Storybook for visual reference
48+
49+
2. **Component Documentation**
50+
- Document style-related props in component interfaces
51+
- Include examples of style customization in component stories
52+
- Provide clear documentation for theme customization
53+
- Maintain a consistent documentation style across all components
54+
55+
**Best Practices**
56+
57+
1. **Theme Customization**
58+
- Use theme variables for consistent styling
59+
- Document theme customization options
60+
- Provide sensible defaults that can be overridden
61+
- Maintain backward compatibility with theme changes
62+
63+
2. **Style Organization**
64+
- Group related styles together
65+
- Use meaningful variable names
66+
- Comment complex style logic
67+
- Follow a consistent file structure for styles
68+
69+
3. **Testing**
70+
- Include visual regression tests for style changes
71+
- Test across different themes and customizations
72+
- Verify responsive behavior
73+
- Ensure accessibility compliance
74+
75+
**Contributing Guidelines**
76+
77+
- Follow the established style patterns
78+
- Document any new style-related features
79+
- Include appropriate tests for style changes
80+
- Update documentation when adding new style options
81+
- Ensure backward compatibility with existing styles

0 commit comments

Comments
 (0)