forked from CenterForDigitalHumanities/rerum-playground
-
Notifications
You must be signed in to change notification settings - Fork 7
Added the Documentation for all HTML, js files and README #87
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
Open
Devayani1612
wants to merge
49
commits into
main
Choose a base branch
from
dev_devayani
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
6df3c68
Merge pull request #70 from oss-slu/dev_devayani
LuisPalmejar21 e667f69
Documented all .html files located in the /web/ folder to explain the…
LuisPalmejar21 9fcf656
Added docs
joeljoby02 016aafe
Update about.md
Devayani1612 74fb6c7
Update about.md
Devayani1612 508a35c
Merge pull request #71 from oss-slu/dev_luis
Devayani1612 0ce97a8
Docusaurus integration
joeljoby02 23ad4b4
Added node version
joeljoby02 74f5916
Updated my repository content based on Devayani's feedback for Sprint 3.
LuisPalmejar21 557dc78
Merge branch 'dev_luis' of https://github.com/oss-slu/rerum-playgroun…
LuisPalmejar21 a06fbd1
Merge pull request #73 from oss-slu/dev_luis
Devayani1612 4017a6c
Added docs for json-utils.js and json-utils.test.js
joeljoby02 9934ede
Merge pull request #72 from oss-slu/dev_joel
Devayani1612 86e4794
Updated readme.md
joeljoby02 c7c027b
Renamed sandbox and tools documentation files to sandbox-html.md and …
LuisPalmejar21 a64df0e
Merge pull request #77 from oss-slu/dev_joel
Devayani1612 cbab18f
Copied sandbox-html.md and tools-html.md from dev_luis branch
Devayani1612 583df85
Moved fetch functions to objectService.js
joeljoby02 021e699
Reverted HTTP error messages
joeljoby02 c76a5d0
Refactored JavaScript files in rerum-playground/web by moving DOM rel…
LuisPalmejar21 ecb9abe
Worked on issue #90
joeljoby02 b9e0d9d
Move new file to utils folder
joeljoby02 03175d3
Worked on issue #92
joeljoby02 1ffcc12
Merge pull request #94 from oss-slu/dev_joel
Devayani1612 6f3c476
Made some refactoring. Based on Devayani's feedback on my recent pull…
LuisPalmejar21 e014891
Updated CONTRIBUTING.md based on new architecture rules.
LuisPalmejar21 b46db4f
Updated CONTRIBUTING.md to include a short guide on how to add a new …
LuisPalmejar21 57a7f18
Resolved merge conflicts for PR #103 (Issues #89, #91, #93)
Devayani1612 c3fb656
Add technical architecture refactor blog post
Devayani1612 5eeb929
WIP: local changes before pull
Devayani1612 5330611
Added refactor blog post
Devayani1612 ed7b010
Added refactor blog post
Devayani1612 a703bfd
Updated
Devayani1612 c95bb3e
Fix menu and footer loading using layout service
Devayani1612 f159982
ISSUE 114 API DOCUMENTATION
akearney6 86b81a1
Fix broken script references in index.html and about.html
teamomiamigo 2db2fcd
Define requirements for annotation text search functionality
teamomiamigo e221c15
Cleanup API documentation by removing redundant sections
Devayani1612 951af3f
Merge pull request #119 from oss-slu/akearney6_issue114
Devayani1612 8fa16ad
Revise search requirements and API endpoint details
Devayani1612 017d792
Merge branch 'dev_devayani' into 113-define-requirements-for-annotati…
Devayani1612 969e37b
Merge pull request #117 from oss-slu/113-define-requirements-for-anno…
Devayani1612 5f9f5bc
Implement RERUM annotation search service with paging and normalization
teamomiamigo 9024f45
update on issue 115 and working on search implementation
teamomiamigo f3721bb
fixes the search mechanics and error handling
teamomiamigo 6a446f2
Merge pull request #122 from oss-slu/115-implement-annotation-search-…
Devayani1612 619387a
Integrate annotation search into Sandbox UI and fix module loading
teamomiamigo 370d461
fixing issues from comments
teamomiamigo 3b7d8c6
Merge pull request #126 from oss-slu/124-integrate-annotation-search-…
Devayani1612 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # about.html Documentation | ||
| ## About the "about.html" File | ||
| This html file presents the about page in the RERUM Playground website explaining what RERUM is about and details of RERUM playground's elements. | ||
|
|
||
|
|
||
| ## Structure Overview | ||
|
|
||
| **head Container** | ||
|
|
||
| - Consists of links to specific JavaScript files for functionality | ||
| and css files for the page aesthetics. | ||
|
|
||
| **body Container** | ||
|
|
||
| - Consists of elements being displayed on the website. | ||
|
|
||
| ### Classes | ||
|
|
||
| **div class = "header"** | ||
| - Represents the top portion of the RERUM about page shown below. | ||
|  | ||
|
|
||
| **div class = "content"** | ||
| - Represents the middle portion of the RERUM about page showing what | ||
| RERUM Playground is and some of their elements in detail shown below. | ||
|
|
||
|  | ||
|
|
||
| **div class = "json"** | ||
| - Represents an example | ||
| a description of an object in JSON looks like shown below. | ||
|
|
||
|  | ||
|
|
||
| **div class = "spacer"** | ||
| - A dedicated empty div element intended to provide necessary vertical spacing at the bottom of the page, ensuring content does not overlap the fixed-position page footer. | ||
|
|
||
| ### IDs | ||
|
|
||
| **div id = "menu-placeholder"** | ||
| - Container where only the | ||
| menu elements would go. | ||
|
|
||
| **div id = "footer-placeholder"** | ||
| - Container where only the | ||
| footer elements would go. | ||
|
|
||
| ### Linked Files | ||
|
|
||
| **JavaScript** | ||
| - playground.js | ||
| - about.js (Not in Repository) | ||
|
|
||
| **CSS** | ||
| - playground.css | ||
| - about.css | ||
|
|
||
| ## Integration with JavaScript | ||
|
|
||
| **function openCloseMenu() function** | ||
| - Triggered when the user clicks | ||
| on the three horizontal lines symbol at the header, which opens or closes the menu. | ||
|
|
||
| **fetch('footer.html')** | ||
| - Fetches elements belonging to the footer-placeholder ID. | ||
|
|
||
| **fetch('menu.html')** | ||
| - Fetches elements belonging to the menu-placeholder ID. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
|
|
||
| # Configuration Reference: config.js | ||
|
|
||
| This document describes the configuration options available in `config.js` for the RERUM Playground web application. | ||
|
|
||
| ## Overview and Purpose | ||
| `config.js` exports a global configuration object for the app, centralizing URLs, event names, logging levels, version info, and catalogs for tools, interfaces, and technologies. This module enables consistent configuration and integration across the playground. | ||
|
|
||
| --- | ||
|
|
||
| ## Property Descriptions | ||
|
|
||
| ### URLS | ||
| - **Type:** `object` | ||
| - **Purpose:** Endpoints for interacting with RERUM services. | ||
| - **Properties:** | ||
| - `CREATE`, `UPDATE`, `PATCH`, `OVERWRITE`, `QUERY`, `SINCE`, `HISTORY` (all `string` URLs) | ||
|
|
||
| ### EVENTS | ||
| - **Type:** `object` | ||
| - **Purpose:** Event names used throughout the app for broadcasting and handling UI/application state changes. | ||
| - **Properties:** | ||
| - `CREATED`, `UPDATED`, `LOADED`, `NEW_VIEW`, `VIEW_RENDERED`, `CLICKED` (all `string` event names) | ||
|
|
||
| ### APPAGENT | ||
| - **Type:** `string` | ||
| - **Purpose:** Identifier for the registered app agent. Should be set after registering a new app with RERUM. | ||
|
|
||
| ### LOGLEVEL | ||
| - **Type:** `number` | ||
| - **Purpose:** Controls the verbosity of logging throughout the app. | ||
| - **Values:** | ||
| - `0`: OFF | ||
| - `6`: TRACE | ||
| - `5`: DEBUG | ||
| - `4`: INFO | ||
| - `3`: WARNING (default) | ||
| - `2`: ERROR | ||
| - `1`: FATAL | ||
|
|
||
| ### VERSION | ||
| - **Type:** `string` | ||
| - **Purpose:** Current version of the playground app. | ||
|
|
||
| ### TOOLS | ||
| - **Type:** `object` | ||
| - **Purpose:** Catalog of available tools for the playground. | ||
| - **Properties:** | ||
| - `id` (`string`): DOM id for the tool set container. | ||
| - `catalog` (`array`): Imported from `toolsCatalog.js`. | ||
|
|
||
| ### INTERFACES | ||
| - **Type:** `object` | ||
| - **Purpose:** Catalog of available interfaces (currently empty). | ||
| - **Properties:** | ||
| - `id` (`string`): DOM id for the interface set container. | ||
| - `catalog` (`array`): Intended for interface definitions. | ||
|
|
||
| ### TECHNOLOGIES | ||
| - **Type:** `object` | ||
| - **Purpose:** Catalog of available technologies (currently empty). | ||
| - **Properties:** | ||
| - `id` (`string`): DOM id for the technology set container. | ||
| - `catalog` (`array`): Intended for technology definitions. | ||
|
|
||
| --- | ||
|
|
||
| ## Example Usage/Workflow Snippet | ||
|
|
||
| ```javascript | ||
| import config from './config.js'; | ||
|
|
||
| // Access the CREATE endpoint | ||
| fetch(config.URLS.CREATE, { method: 'POST', body: JSON.stringify({}) }); | ||
|
|
||
| // Use an event name | ||
| document.dispatchEvent(new CustomEvent(config.EVENTS.CREATED)); | ||
|
|
||
| // List all tool labels | ||
| config.TOOLS.catalog.forEach(tool => console.log(tool.label)); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Dependencies/Relationships | ||
| - Imports `ToolsCatalog` from `toolsCatalog.js` for the tools catalog. | ||
| - Used by most modules for configuration, event names, and endpoint URLs. | ||
| - Can be extended to import interface/technology catalogs from other repositories. | ||
|
|
||
| --- | ||
|
|
||
| For further details, see the source file: `web/js/config.js`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # footer.html Documentation | ||
| ## About the "footer.html" File | ||
| The footer.html file represents the bottom of the page with various links to specific pages. | ||
|
|
||
|
|
||
| ## Structure Overview | ||
|
|
||
| **footer Container** | ||
| - Consists of elements being displayed on the website shown below. | ||
|
|
||
|  | ||
|
|
||
| ### Classes | ||
|
|
||
| **div class = "footerButtons"** | ||
| - Represents all buttons within the footer container. | ||
|
|
||
|
|
||
| **div class = "button"** | ||
| - Represents a clickable button to a specified link. | ||
|
|
||
| **i class = "fa fa-symbolname"** | ||
| - Represents a symbols on the footer to represent | ||
| specific site locations. | ||
|
|
||
| ### Linked Files | ||
|
|
||
| **CSS** | ||
| - font-awesome.min.css (external link) | ||
| - footer.css |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # index.html Documentation | ||
| ## About the "index.html" File | ||
| This html file is presented as the welcome page of RERUM Playground. | ||
| This displays the welcome messages. | ||
|
|
||
| ## Structure Overview | ||
|
|
||
| **head Container** | ||
|
|
||
| - Consists of links to specific JavaScript files for functionality | ||
| and css files for the page aesthetics. | ||
|
|
||
| **body Container** | ||
|
|
||
| - Consists of elements being displayed on the website. | ||
|
|
||
| ### Classes | ||
|
|
||
| **div class = "header"** | ||
| - Represents the top portion of the RERUM about page shown below. | ||
|  | ||
|
|
||
| **div class = "container"** | ||
| - Represents the page space between the header and the footer. | ||
|
|
||
| **div class = "placeholder"** | ||
| - Represents the spacing between the footer and the welcome | ||
| message content. | ||
|
|
||
| **div class = "content"** | ||
| - Represents the middle portion of the RERUM about page showing a welcome message shown below. | ||
|  | ||
|
|
||
| ### IDs | ||
|
|
||
| **div id = "menu-placeholder"** | ||
| - container where only the | ||
| menu elements would go. | ||
|
|
||
| **div id = "footer-placeholder"** | ||
| - container where only the | ||
| footer elements would go. | ||
|
|
||
| ### Linked Files | ||
|
|
||
| **JavaScript** | ||
| - playground.js | ||
| - about.js (Not in Repository) | ||
|
|
||
| **CSS** | ||
| - playground.css | ||
| - about.css | ||
|
|
||
| ## Integration with JavaScript | ||
|
|
||
| **function openCloseMenu() function** | ||
| - Triggered when the user clicks | ||
| on the three horizontal lines symbol at the header, which opens or closes the menu. | ||
|
|
||
| **fetch('footer.html')** | ||
| - Fetches elements belonging to the footer-placeholder ID. | ||
|
|
||
| **fetch('menu.html')** | ||
| - Fetches elements belonging to the menu-placeholder ID. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # JSON Utilities Reference: json-utils.js | ||
|
|
||
| This document describes the small JSON helper utilities provided by `json-utils.js` for the RERUM Playground project. | ||
|
|
||
| ## Overview and Purpose | ||
| `json-utils.js` provides two focused helpers for working with JSON strings and objects: | ||
| - `prettifyJSON` — formats JSON with indentation for human-readable display, and returns a helpful error message when input is not valid JSON. | ||
| - `validateJSON` — returns a boolean indicating whether a string is valid JSON. | ||
|
|
||
| These helpers are useful when accepting JSON input from users, preparing JSON for display, or performing quick client-side validation before sending data to APIs. | ||
|
|
||
| --- | ||
|
|
||
| ## Function Descriptions | ||
|
|
||
| ### prettifyJSON(input) | ||
| - **Parameters:** | ||
| - `input` (`string | object`) — A JSON string or a plain JavaScript object. | ||
| - **Returns:** `string` | ||
| - **Behavior:** | ||
| - If `input` is a string, attempts to `JSON.parse` it to an object. If parsing succeeds, returns `JSON.stringify(obj, null, 2)` (pretty-printed JSON with 2-space indentation). | ||
| - If `input` is already an object, returns its pretty-printed JSON representation. | ||
| - If parsing fails, returns a short error string that begins with `Invalid JSON:` and includes the parser's error message. | ||
|
|
||
| ### validateJSON(input) | ||
| - **Parameters:** | ||
| - `input` (`string`) — A string that should contain JSON. | ||
| - **Returns:** `boolean` | ||
| - **Behavior:** | ||
| - Attempts to `JSON.parse(input)` and returns `true` when parsing succeeds, otherwise returns `false` when parsing throws an error. | ||
|
|
||
| --- | ||
|
|
||
| ## Example Usage / Workflow Snippet | ||
|
|
||
| ```javascript | ||
| // CommonJS usage (as in this project) | ||
| const { prettifyJSON, validateJSON } = require('../web/js/json-utils.js'); | ||
|
|
||
| const raw = '{"name":"Alice","age":30}'; | ||
| if (validateJSON(raw)) { | ||
| const pretty = prettifyJSON(raw); | ||
| console.log(pretty); | ||
| } else { | ||
| console.warn('Provided input is not valid JSON'); | ||
| } | ||
|
|
||
| // Passing an object directly | ||
| const obj = { a: 1, b: [2,3] }; | ||
| console.log(prettifyJSON(obj)); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Dependencies / Relationships | ||
| - No external dependencies — uses the built-in `JSON` global. | ||
| - The test file `web/js/json-utils.test.js` exercises these functions (see `json-utils.test.md`). | ||
| - Use these helpers in UI code that reads user-supplied JSON or displays API responses. | ||
|
|
||
| --- | ||
|
|
||
| For further details, see the source file: `web/js/json-utils.js`. |
Oops, something went wrong.
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.
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.
LTS is node 24 now!