Skip to content
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

feat: Make adding new versions easier #232

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

feat: Make adding new versions easier #232

wants to merge 6 commits into from

Conversation

HagerDakroury
Copy link
Collaborator

Checklist

  • I indicated which issue (if any) is closed with this PR using closing keywords
  • I only changed lines related to my PR (no bulk reformatting)
  • I indicated the source and check the license if I re-use code, or I did not re-use code
  • I made my best to solve only one issue in this PR, or explain why multi had to be solved at once.

Details

During a discussion with @matuskalas last week, we agreed that it'll be for the best if we tried to put all hard-coded values related to the versions (links, the order in dropdown menu, labels, etc.) in one file.

The goal behind that is to have the possibility of adding a new version and updating existing ones (like "stable" to 1.26 instead of 1.25) be as seamless as possible, with just one or 2 lines change.

This PR achieves that.
To test/add a new version:

  1. Add the version key as a property in this map (with any order), with the appropriate label and url (if not found, it will be loaded from the base url)
  2. Add the key to this array with the desired order in the dropdown menu.

That's it! Example of adding 1.22:

versionlow

js/versionsMap.js Outdated Show resolved Hide resolved
Copy link
Member

@matuskalas matuskalas left a comment

Choose a reason for hiding this comment

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

Awesome, thank you so much @HagerDakroury 🙏🏽 This will indeed make a very big difference for ontology maintainers🙌🏽

One last thing before merge: @HagerDakroury, would you please rename the file to anything you agreed on with @bryan-brancotte, such as 'ontoBrowserConfig.js' or 'configOntoBrowser.js' or similar, shorter/longer... Million thanks! 🙏🏽🙇🏽‍♂️
(because if we renamed it later, the history might not be properly visible on GitHub)

Copy link
Member

@matuskalas matuskalas left a comment

Choose a reason for hiding this comment

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

@HagerDakroury
Copy link
Collaborator Author

@bryan-brancotte has suggested moving this part to the config file as well, as its edam-specific

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants