Improve Contributor Documentation and README Navigation#6770
Closed
Ansita20 wants to merge 2 commits into
Closed
Conversation
Signed-off-by: ansita20 <ansitasingh20@gmail.com>
…hooting guides Signed-off-by: ansita20 <ansitasingh20@gmail.com>
Contributor
|
Closing this PR for now since it has large amount of unrelated changes and appears heavily AI-generated |
Contributor
|
Thank you! @rahulshendre |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Improves contributor-facing documentation (README navigation + CONTRIBUTING prerequisites/testing/troubleshooting), but the PR also introduces a UI dark-mode theming system and updates dev proxy/dependencies.
Changes:
- Added “Quick Navigation” + local development pointers to
README.md - Expanded
CONTRIBUTING.mdwith prerequisites, testing commands, and troubleshooting - Added light/dark theme support (ThemeContext + toggle), updated app bootstrap to use it, and tweaked dev proxy/deps
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| web/webpack.config.dev.js | Extends dev proxy to include /auth routes |
| web/src/theme.ts | Refactors theme export into light/dark themes + getTheme |
| web/src/index.tsx | Switches from MUI ThemeProvider to custom ThemeContext provider |
| web/src/contexts/ThemeContext.tsx | Adds theme mode state, persistence, and system preference handling |
| web/src/components/theme/ThemeToggle.tsx | Adds header toggle button for light/dark mode |
| web/src/components/header/index.tsx | Renders the theme toggle in the header |
| web/package.json | Adds ajv + ajv-keywords dependencies |
| README.md | Adds quick navigation table + local development section |
| CONTRIBUTING.md | Adds prerequisites, testing guidance, and troubleshooting section |
Comment on lines
+34
to
+45
| ### Quick Navigation | ||
|
|
||
| | Resource | Purpose | | ||
| |----------|---------| | ||
| | [PipeCD Website](https://pipecd.dev) | Official project website and product information | | ||
| | [Documentation](https://pipecd.dev/docs/) | Comprehensive guides and API documentation | | ||
| | [Quickstart Guide](https://pipecd.dev/docs/quickstart/) | Get started with PipeCD in minutes | | ||
| | [Installation Guide](https://pipecd.dev/docs/installation/) | Set up PipeCD for production use | | ||
| | [Playground](https://play.pipecd.dev?project=play) | Try PipeCD online without installation | | ||
| | [Contributing Guide](CONTRIBUTING.md) | Guidelines for contributing to PipeCD | | ||
| | [GitHub Issues](https://github.com/pipe-cd/pipecd/issues) | Report bugs and request features | | ||
| | [Community Chat](https://cloud-native.slack.com/archives/C01B27F9T0X) | Join #pipecd on CNCF Slack | |
Comment on lines
+38
to
+39
| "ajv": "^8.20.0", | ||
| "ajv-keywords": "^5.1.0", |
Comment on lines
+37
to
+56
| const [mode, setMode] = useState<ThemeMode>(() => { | ||
| // Try to load from localStorage | ||
| if (typeof window !== "undefined") { | ||
| const stored = localStorage.getItem(THEME_STORAGE_KEY) as ThemeMode | null; | ||
| if (stored && (stored === "light" || stored === "dark")) { | ||
| return stored; | ||
| } | ||
| } | ||
| // Fall back to default or system preference | ||
| return defaultMode || getSystemThemeMode(); | ||
| }); | ||
|
|
||
| // Persist theme mode to localStorage | ||
| useEffect(() => { | ||
| localStorage.setItem(THEME_STORAGE_KEY, mode); | ||
| // Update HTML attribute for CSS-based styling if needed | ||
| if (typeof window !== "undefined") { | ||
| document.documentElement.setAttribute("data-theme", mode); | ||
| } | ||
| }, [mode]); |
Comment on lines
+60
to
+67
| const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)"); | ||
| const handleChange = (e: MediaQueryListEvent) => { | ||
| const stored = localStorage.getItem(THEME_STORAGE_KEY); | ||
| // Only update if user hasn't explicitly set a preference | ||
| if (!stored) { | ||
| setMode(e.matches ? "dark" : "light"); | ||
| } | ||
| }; |
Comment on lines
+59
to
+60
| useEffect(() => { | ||
| const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)"); |
Comment on lines
+69
to
+71
| mediaQuery.addEventListener("change", handleChange); | ||
| return () => mediaQuery.removeEventListener("change", handleChange); | ||
| }, []); |
Comment on lines
+12
to
+15
|
|
||
| return ( | ||
| <Tooltip title={`Switch to ${mode === "light" ? "dark" : "light"} mode`}> | ||
| <IconButton onClick={toggleTheme} size="small" color="inherit"> |
| context: ["/api", "/auth"], | ||
| changeOrigin: true, | ||
| target: process.env.API_ENDPOINT, | ||
| pathRewrite: { "^/api": "" }, |
Comment on lines
+357
to
358
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Improve Contributor Documentation and README Navigation
Title
docs: improve contributor onboarding documentation
Description
This pull request improves the overall documentation structure and contributor experience by enhancing both
README.mdandCONTRIBUTING.md.The goal is to make onboarding easier for new contributors and provide clearer guidance for development, testing, and troubleshooting.
Changes Made
Added Prerequisites Section in
CONTRIBUTING.mdIncluded detailed setup requirements such as:
npm,pnpm,yarn)fixes : #6769
Added Testing Section
Documented how contributors can validate changes before submitting PRs.
Included commands for:
npm run test npm run lint npm run build