-
Notifications
You must be signed in to change notification settings - Fork 10
Add settings #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add settings #9
Conversation
Added maintenance notice regarding server relocation.
Removed maintenance notice from the README.
…splay an unavailability message. Fix #3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a comprehensive settings system to the SimRepo browser extension, replacing the placeholder options page with a fully functional YAML-based configuration editor powered by CodeMirror.
Key Changes:
- Implements a YAML editor with schema validation for configuring extension features
- Adds configurable options for similar repository recommendations and homepage features
- Updates API endpoint URL and improves content script URL change detection
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| source/options.js | Complete rewrite implementing CodeMirror YAML editor with auto-save, schema validation, and default configuration generation |
| source/options.html | Simplified HTML structure to host the CodeMirror editor with minimal custom styling |
| source/options.css | Removed entirely as styling is now handled by CodeMirror and inline styles |
| source/options-storage.js | Updated default options to include settings for similar repos and homepage recommendations |
| source/content.js | Enhanced URL change detection to use pathname instead of full href, added /feed route handling |
| source/content-stars.js | Integrated options to control homepage recommendations including enabling/disabling, count limits, and randomization |
| source/content-repo.js | Added options support for similar repositories feature including private repo handling and customizable display count |
| source/background.js | Updated API endpoint URL to new domain |
| package.json | Added CodeMirror, YAML, and related dependencies for the new editor |
| package-lock.json | Locked dependency versions for all new packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 19 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } catch (e) { | ||
| console.error("YAML parse error — not saving:", e.message); |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message logs the exception message but doesn't provide any feedback to the user about parse errors. Consider displaying parse errors in the UI so users know when their YAML is invalid and why saving failed.
| import octicons from "@primer/octicons"; | ||
| import GH_LANG_COLORS from 'gh-lang-colors'; | ||
| import { formatNumber, getSimilarRepos, loadingSpinner } from './common.js'; | ||
| import { formatNumber, getSimilarRepos, loadingSpinner, setupSettingsListener } from './common.js'; |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon after the import statement. All other imports in this file end with semicolons for consistency.
| import octicons from "@primer/octicons"; | ||
| import { getSimilarRepos, formatNumber, loadingSpinner } from './common.js'; | ||
| import { getSimilarRepos, formatNumber, loadingSpinner, setupSettingsListener } from './common.js'; | ||
| import { optionsStorage } from './options-storage.js'; |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon after the import statement for consistency with other statements in the file.
| import { basicSetup } from "codemirror" | ||
| import { EditorView, keymap } from "@codemirror/view" | ||
| import { yaml } from "@codemirror/lang-yaml" | ||
| import { yamlSchema } from 'codemirror-json-schema/yaml'; |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon at the end of the import statement. All other imports in this file end with semicolons for consistency.
| required: [], | ||
| }; | ||
|
|
||
| let editor = document.getElementById('editor'); |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon after the variable declaration for consistency with other statements in the file.
| } | ||
| } | ||
|
|
||
| var view = null; |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon after the variable declaration for consistency with other statements in the file.
| import { getSimilarRepos, formatNumber, loadingSpinner, setupSettingsListener } from './common.js'; | ||
| import { optionsStorage } from './options-storage.js'; | ||
|
|
||
| var loading = false; |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon after the variable declaration for consistency with other statements in the file.
| @@ -1,8 +1,8 @@ | |||
| import { initCache } from './cache.js'; | |||
|
|
|||
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon after the import statement for consistency with other statements in the file.
| import 'webext-base-css'; | ||
| import './options.css'; | ||
| import { optionsStorage } from './options-storage.js'; | ||
| import { basicSetup } from "codemirror" |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon at the end of the import statement. All other imports in this file end with semicolons for consistency.
| import { basicSetup } from "codemirror" | |
| import { basicSetup } from "codemirror"; |
| }); | ||
|
|
||
| let changed = false; | ||
| let saveTimeout = null; |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon after the variable declaration for consistency with other statements in the file.
No description provided.