Skip to content

Update fields and generalize repo URL encoding#30

Merged
likeajumprope merged 5 commits intoReproNim:mainfrom
likeajumprope:main
Apr 16, 2026
Merged

Update fields and generalize repo URL encoding#30
likeajumprope merged 5 commits intoReproNim:mainfrom
likeajumprope:main

Conversation

@likeajumprope
Copy link
Copy Markdown
Collaborator

This pull request refactors the handling of the "Open Dataset" and "Description" fields across the Add, Edit, and Browse Material dialogs, and makes the GitHub repository URL dynamic based on the deployment context. It also removes several unused or deprecated fields to streamline the codebase and user interface.

Field and UI Refactoring:

  • The "Open Dataset" field is now represented as a boolean with a checkbox in both AddMaterialDialog and EditMaterialDialog, replacing the previous enum/select input. Filtering in the browser is updated to use this boolean logic. [1] [2] [3] [4] [5] [6]
  • The "Description" field replaces the previous "Review" field throughout the add, edit, and browse dialogs, including form state, YAML formatting, and search functionality. [1] [2] [3] [4] [5] [6]

Removal of Deprecated/Unused Fields:

  • The following fields and their UI controls were removed from the edit dialog and data formatting: functionality, assessment, exclude_from_repro_inventory, and alias_links. The assessment filter was also removed from the browser. [1] [2] [3] [4] [5] [6] [7]

Dynamic GitHub Repo URL:

  • Introduced a new utility function getGitHubRepoUrl in frontend/src/lib/github.ts to dynamically determine the GitHub repository URL based on the runtime hostname, supporting forks and local development. All hardcoded repo URLs are replaced with this function. [1] [2] [3] [4] [5] [6]

Data Fetching Improvement:

  • The path for fetching reproinventory_data.json is now constructed using import.meta.env.BASE_URL for improved compatibility with different deployment environments.

Type Clean-up:

  • Removed the OpenDatasetEnum type and its usage throughout the codebase, reflecting the new boolean representation. [1] [2] [3] [4] [5]

These changes collectively simplify the code, improve clarity for users, and enhance compatibility with forks and different deployment setups.

@likeajumprope
Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the ReproInventory data model and frontend, renaming the "review" field to "description", converting "open_dataset" and "assessment" to boolean types, and cleaning up unused fields. The UI for adding and editing materials now uses checkboxes for dataset availability, and a new utility derives the GitHub repository URL dynamically. Feedback was provided to ensure that unchecking the "open dataset" checkbox explicitly sets the value to "false" rather than "null", preventing issues with YAML generation and browser filtering.

Comment thread frontend/src/components/AddMaterialDialog.tsx Outdated
Comment thread frontend/src/components/EditMaterialDialog.tsx Outdated
likeajumprope and others added 3 commits April 16, 2026 15:34
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@likeajumprope likeajumprope merged commit e341e8f into ReproNim:main Apr 16, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant