-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Create Configuration File for Personalization #35
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
base: main
Are you sure you want to change the base?
Conversation
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 PR transforms the Imageomics Catalog into a reusable template by extracting hardcoded organization-specific values into a centralized configuration file. The changes enable other organizations to personalize the catalog by modifying a single config.js file instead of editing multiple files throughout the codebase.
Changes:
- Created
config.jswith all customizable settings (organization names, branding, colors, API settings, and behavior options) - Refactored
main.js,index.html, andstyle.cssto consume configuration values dynamically instead of using hardcoded constants - Added comprehensive template usage documentation in README with detailed personalization instructions
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| config.js | New centralized configuration file containing all customizable settings with inline documentation |
| main.js | Updated to reference CONFIG object, added initializeUIFromConfig function, and made GitHub API calls use dynamic repository URLs |
| index.html | Modified to load config.js and apply configuration values through inline scripts and DOMContentLoaded handlers |
| style.css | Converted hardcoded colors to CSS custom properties populated from config.js at runtime |
| README.md | Added "How to Use This Template" section with detailed instructions for personalizing config.js settings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
egrace479
left a comment
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.
Mostly just some notes on the instructions. Overall, looks good!
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
egrace479
left a comment
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.
LGTM!
Summary
This PR transforms the Imageomics Catalog repository into a reusable template that other organizations can easily customize. The repository previously contained hardcoded organization names, colors, branding, and other settings throughout multiple files. All hardcoded values have been extracted into a centralized
config.jsconfiguration file, making it straightforward for users to personalize the catalog by editing a single file. The usage of aconfig.jsfile serves two purposes, first it simplifies the personalization step by requiring modifying only one file, and secondly a javascript file to take advantage of code comments to clarify each variable in the file.Changes Made
Created
config.js: New central configuration file containing all customizable settings including organization names, branding (title, description, logos), color scheme, API settings, and behavior options.Refactored code to use config values:
main.jsto referenceCONFIGobject instead of hardcoded constantsindex.htmlto dynamically apply config values (with minimal inline script for immediate setup to avoid FOUC)style.cssto use CSS custom properties that are populated from config\Added documentation: Comprehensive "How to Use This Template" section in README with instructions on using the GitHub template feature and detailed personalization guide for
config.js.Closes #19