Releases: DMPRoadmap/roadmap
v5.0.2
- Bump Ruby to v3.1.4 and use
.ruby-versionin CI - Enable session timeout after 90 minutes of inactivity #3568
- Validate CSV Separator #3569
- Fix rendering of
confirm_mergepartial #3567 - Improve CI configuration #3551
- Bump nokogiri from 1.17.2 to 1.18.9 #3547
- Bump activerecord from 7.1.5.1 to 7.1.5.2 #3549
- Bump rack-session from 2.1.0 to 2.1.1 #3524
- Bump net-imap from 0.4.19 to 0.4.20 #3518
- Bump rexml from 3.4.1 to 3.4.2 #3562
- Bump tmp from 0.2.3 to 0.2.4 #3548
- Update Gems and Address New Rubocop Offences #3572
v5.0.1
v5.0.1
- Updated seeds.rb file for identifier_schemes to include context value and removed logo_url and idenitifier_prefix for Shibboleth (as it was causing issues with SSO). #3525
- Adjustments to style of select tags and plan download layout #3509
- Fix failing eslint workflow / upgrade
actions/checkout&actions/setup-nodeto v3 #3503 - Remove Auto-Generated TinyMCE Skins and Add
public/tinymce/skins/to.gitignore#3466
v5.0.0
The primary change in this major DMPRoadmap release is the upgrade from Rails 6.1 to Rails 7.1. As part of this upgrade, the handling of conditional questions was updated, including a migration that converts the Condition.option_list and Condition.remove_data fields to proper JSON types (#3497).
In addition to the framework upgrade, this release includes a number of refactors, bug fixes, dependency updates, and performance optimisations. For further details, please refer to the pull requests and issues listed below:
- Updated app to Rails 7 #3426, #3496
- Address Some Bullet Warnings / Optimise Mean Request Times #3440
- Fix Flaky Tests / Optimize Checking of
plan.titleWithinspec/features/plans/exports_spec.rb#3451 - Refactor Plan.deep_copy(plan) #3469
- Fixed a bug in the deep copy of plans where the old identifier was being copied into the new plan. We now copy the generated id of the new plan to the identifier field.
- Fixed bar chart click function in the Usage dashboard (GitHub issue #3443)
- Fixed broken link for the V1 API documentation.
- Fix
hidden_field_tagNested Attributes Format For Rails 7 Upgrade and Add Test Coverage #3479 - Update all workflows to
runs-on: ubuntu-24.04and Consolidate Capybara Config #3487 - Add pdf handling in
render_respond_to_format_with_error_message#3482 - Lower PostgreSQL GitHub Action Chrome Version to Address Breaking Changes Between Latest Chrome Version (134) and
/featuresTests #3491 - Bumped dependencies via
bundle update && yarn upgrade#3483 - Fixed issues with Conditional Question serialization offered by @briri from PR CDLUC3#667 for DMPTool. There is a migration file with code for MySQL and Postgres to update the Conditions table to convert JSON Arrays in string format records in the conditions table so that they are JSON Arrays.
- Refactor
org_admin/conditions/_form.html.erb#3502 - Refactor
Question.save_condition#3501 - Bump tinymce from 6.8.5 to 7.2.0 #3505
v4.2.0
Note this upgrade is mainly a migration from Bootstrap 3 to Bootstrap 5.
Note that this will have a significant impact on any scss and html customizations you may have made to your fork of this project.
The following links will be helpful:
Get started with Bootstrap v5.2.3
Migrating to v4
How to Migrate from Bootstrap Version 3 to 4
Migrating to v5
How to Migrate from Bootstrap Version 4 to 5
Use Bootstrap 5 with Ruby on Rails 6 and webpack
What happened to $grid-float-breakpoint in Bootstrap 4. And screen size breakpoint shift from 3 -> 4
What are media queries in Bootstrap 4?
Key changes
- Node package changes:
- Changed version of
bootstrap "^3.4.1"-->"^5.2.3" - Added
@popperjs/core. - Removed
bootstrap-3-typeahead, bootstrap-sass & popper.js
- Changed version of
- Stylesheet changes
-
In
app/assets/stylesheets/application.scss:- removed
bootstrap-sassimport
and replaced with
@import "../../../node_modules/bootstrap/scss/bootstrap";
- removed
-
The order of the
importstatements have been changed to import theblocks/andutils/after the default bootstrap stylesheets -
In
app/assets/stylesheets/blocks/:- Replaced in relevant files:
@use "../../../../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss" as * ;
with
@use "../../../../node_modules/bootstrap/scss/bootstrap" as *;
- Enclosed all division calculations using symbol
/withcalc()function,
e.g., replaced
padding-right: $grid-gutter-width / 2;
with
padding-right: calc($grid-gutter-width / 2); - Replaced breaking media queries since Bootstrap 3:
-
@media (max-width: $grid-float-breakpoint-max) {}
with
@include media-breakpoint-down(md){} -
@media (max-width: $grid-float-breakpoint-max) {}
with
@include media-breakpoint-down(md) {}
-
- Replaced in relevant files:
-
Deleted
app/javascript/src/utils/popoverHelper.js.
-
- Mixins
- Media query mixins parameters have changed for a more logical approach.
media-breakpoint-down()uses the breakpoint itself instead of the next breakpoint (e.g.,media-breakpoint-down(lg)instead ofmedia-breakpoint-down(md)targets viewports smaller than lg).
- Media query mixins parameters have changed for a more logical approach.
- Color system
- All
lighten()anddarken()functions replaced. These functions will mix the color with either white or black instead of changing its lightness by a fixed amount.- Replaced
lighten()bytint-color(). - Replaced
darken()byshade-color().
- Replaced
- All
Components & HTML
Note many of these Bootstrap changes has required us to rewrite or change some of the Javascript files.
When we use a native DOM element in Javascript, we obtain it by applying get() to the Jquery element (cf., https://api.jquery.com/get/).
We sometimes use the button native Dom element to programmatically click, as the Jquery button element with trigger('click') won't work because the trigger() function cannot be used to mimic native browser events, such as clicking (cf., https://learn.jquery.com/events/triggering-event-handlers/ )
- Accordion & spinners
- Bespoke versions replaced by Bootstrap 5 accordion and spinner now.
- Accordion
- Changed the default Bootstrap arrow icon for the accordion to use the fontawesome icons plus and minus icons. Created a several accordion specific colour variables:
// Accordion colors
$color-accordion-button: $color-primary-text;
$color-accordion-button-icon: $color-primary-text;
$color-accordion-button-bg: $color-primary-background;
$color-accordion-button-active-bg: shade-color($color-accordion-button-bg, 30%);
(Seeapp/assets/stylesheets/blocks/_accordion.scssandapp/assets/stylesheets/variables/_colours.scssfor details.) - The drag icon in
app/views/org_admin/sections/_section.html.erbnow appears after the plus (or minus) icon.
- Changed the default Bootstrap arrow icon for the accordion to use the fontawesome icons plus and minus icons. Created a several accordion specific colour variables:
- The spinner block now uses class
d-noneinstead ofhiddento hide. - In views with multiple accordion sections with "expand all" or "collapse all" links, we use the native Dom element of the accordion buttons to programmatically click, (cf. to note above).
- Buttons
- Bootstrap dropped
btn-blockclass for utilities. So we removed any styling using it. - Close Buttons: Renamed
closetobtn-close. - Renamed
btn-defaulttobtn-secondaryand variable$btn-default-colorchanged to$btn-secondary-color.
- Bootstrap dropped
- Dropdowns
- Dropdown list items with class
dropdownhave classdropdown-itemadded usually withpx-3for positioning. - Added new
dropdown-menu-darkvariant and associated variables for on-demand dark dropdowns. - Data attributes changes required by Bootstrap 5 (as used by accordion and dropdown buttons):
data-display-->data-bs-displaydata-parent-->data-bs-parentdata-target-->data-bs-targetdata-toggle-->data-bs-toggle
- Bootstrap 5 Popover added to some dropdown-menu items by adding attribute
data-bs-toggle="popover"
- Dropdown list items with class
- Form
form-groupclass replaced withform-control.- Form labels now require
form-labelorform-check-labelto go withform-controlandform-checkrespectively. So all obsoletecontrol-labelreplaced byform-labeland missing ones added. - Dropped form-specific layout classes for our grid system. Use Bootstrap grid and utilities instead of
form-group,form-row, orform-inline. form-textno longer sets display, allowing you to create inline or block help text as you wish just by changing the HTML element.- Input group addons are now specific to their placement relative to an input. So
input-group-addonand in our case we replaced with
input-group-addon. - Renamed
checkboxandradiointoform-check.
- Images
- Renamed
img-responsivetoimg-fluid.
- Renamed
- Labels and badges
- Class
labelhas been removed and replaced bybadgeto disambiguate from the<label>element.- Renamed
labelclass tobadge - Replaced
label-defaultbybg-secondary - Replaced
label-infobybg-info - Replaced
label-warningbybg-warning .text-dark - Replaced
label-dangerbybg-danger
- Renamed
- Class
- Links
- Links are underlined by default (not just on hover), unless they're part of specific components. So we had to add css to remove underline in many cases.
- Modals
- To programmatically show or hide a Bootstrap modal, we have followed both these approaches:
- Either, get access to the Jquery modal element and call functions
modal('show')ormodal('hide'). - Or, apply click() to the native Dom element of the button to trigger the modal (cf. to note above).
- Either, get access to the Jquery modal element and call functions
- To programmatically show or hide a Bootstrap modal, we have followed both these approaches:
- Navs & navbars
- Bootstrap rewrote component with flexbox. Dropped nearly all > selectors for simpler styling via un-nested classes.
Instead of HTML-specific selectors like .nav > li > a, we use separate classes fornavs, nav-items, and nav-links. (Note because thenav-linkclass has not always been added as it comes with styles not appropriate for our styling for links.)
This makes your HTML more flexible while bringing along increased extensibility. So we have dropped HTML-specific selectors and css in_navs.scss
e.g.,
.nav-tabs > li > a:hover-->nav-tabs nav-link:hover,
.nav-pills > li > a:hover-->nav-pills .nav-link:hover.- Pages with css classes
navandnavbarupdated to work with Bootstrap 5. Soapp/assets/stylesheets/blocks/_navbars.scssandapp/assets/stylesheets/blocks/_navs.scssupdated.- Replaced
nav navbar-navcombination -->navbar-nav - Replaced
navbar-toggle-->navbar-toggler - Replaced multiple spans in
navbar-togglebutton with classicon-bar
--> single span withtoggler-icon - Lists with
nav navbar-navhave classnav-itemadded to list elements.
- Replaced
- Note because the
nav-linkclass include styling that is not appropriate in many places, we have not included it in those cases.
- Pages with css classes
- Bootstrap rewrote component with flexbox. Dropped nearly all > selectors for simpler styling via un-nested classes.
- Notifications
- Notifications now use classes
d-blockandd-noneto show and hide respectively.
- Notifications now use classes
- Panels, thumbnails & wells (replacements)
- Bootstrap 5 dropped panels, thumbnails and wells. So pages with them updated with Bootstrap 5 replacements.
- All views with css classes
panel, panel-body, panel-*Have panel replaced by card to givecard, card_body, card-*, etc. - As
panel-defaultand some otherpanel css classes don't have card equivalents with same suffixes we have added these classes temporarily in_cards.sccs, e.g.,.card-default, etc.
- All views with css classes
- Bootstrap 5 dropped panels, thumbnails and wells. So pages with them updated with Bootstrap 5 replacements.
- Utilities
- Bootstrap renamed several utilities to use logical property names instead of directional names with the addition of RTL support:
- Renamed
left-*andright-*tostart-*andend-*. - Renamed
float-leftandfloat-righttofloat-startandfloat-end. - Renamed
ml-*andmr-*toms-*andme-*. - Renamed
pl-*andpr-*tops-*andpe-*. - Renamed
text-leftandtext-righttotext-startandtext-end.
- Renamed
- The
hiddenandshowclasses have been removed because th...
- Bootstrap renamed several utilities to use logical property names instead of directional names with the addition of RTL support:
v4.1.1
Added
- Added
MORE_INFOandLESS_INFOJS constants (for the Research Outputs feature) - Added a .gitkeep file to the app/assets/builds directory to address potential issues when building the application.css file during production deploys - #3314
Fixed
v4.1.0
Note this upgrade is a migration from Ruby v2.7.6 to v3.0.5. Note that this could have an impact on any customizations you may have made to your fork of this project. Please see https://www.fastruby.io/blog/ruby/upgrades/upgrade-ruby-from-2.7-to-3.0.html for further information on what to check. In particular, please note the changes to the way Ruby 3 handles keyword arguments
Note that the Webpacker gem has been removed in favor of jsbundling-rails. This was done in preparation for the future migration to Rails 7. See issue #3185 for more details on this change. If, after migrating to this version, you see 'Sprockets' related errors in your application you will need to rebuild you asset library. To do this run bin/rails assets:clobber && bin/rails assets:precompile from the project directory.
All gem and JS dependencies were also updated via bundle update && yarn upgrade
Enhancements
- Added enum to the funding status attribute of plan model to make the dropdown of 'funding status' being translatable
- Allow users to download both single phase and in PDF, TEXT and DOCX format. CSV file can only download single phase instead of all phases.
Developers
When running the application on your development machine, run bin/dev instead of the old rails s approach. This will kick off 'foreman' which will startup jsbuilding and cssbuilding so that they watch your CSS and JS files for changes.
Pay close attention to your customizations in the app/views/branded/ directory and any custom JS or CSS you may have for your instance. You may need to make modifications to work with the new JS/CSS Bundling methods. Most notably:
- The
application.jsandapplication.cssfiles have moved. If you were including your custom JS or CSS in this file, make sure that the new versions are importing your files. - If you have custom SCSS files in a separate directory (e.g. not in blocks, variables, etc.), You will need to add an
_index.scssfile for your directory. See the one in/app/assets/stylesheets/blocks/for an example. - If you reference any variables (e.g.
$color-primary-background) in your custom SCSS files, you will need to add@use '../variables/colours' as *;at the top of the file. - The way we include the JS and CSS into the ERB has changed. If you have a custom
app/views/branded/layouts/application.html.erbmake sure that you update the javascript and stylesheet link tags in your<head>section. Seeapp/views/layouts/application.html.erb. - Note that the
app/javascript/src/utils/tinymce.jsfile extension has changed fromjs.erbtojs. If you reference this file in your custom JS, you will need to update your import statement.
Upgrade to Ruby 3
- Upgrade to Ruby version 3.0.5 #3225
- Bumped all Github actions to use ruby 3.0
- Removed
.freezefrom Regex and Range constants since those types are already immutable - Fixed Rubocop complaint about redundancy of
r.nil? ? nil : r.user, so changed it tor&.userinapp/models/plan.rb - Fixed Rubocop complaint about redundant
::in config.log_formatter =::Logger::Formatter.newinconfig/environments/production.rb - Froze
lib/deprecators/*.rbconstants that were Strings - Updated places that were incorrectly using keyword args. See this article for an overview
Upgraded TinyMCE to v6
- Upgraded TinyMCE to v6 (v5 EOL is April 20 2023)
- Adjusted JS code to conform to new TinyMCE version
- Adjusted views to work with the new version
- Updated variables.scss file to fix issue with button text/background color contrast
- Updated blocks/_tables.scss to fix issue with dropdown menu overlap against table
- updated config/initializers/assets.rb to copy over the tinymce skins and bootstrap glyphicons to the public directory so that they are accessible by TinyMCE and Bootstrap code
Removed webpacker gem
As Webpacker is no longer maintained by the Rails community, we have replaced it by jsbundling-rails and cssbundling-rails for the Javascript & CSS compilation.
- Removed
webpackergem - Added
jsbundling-rails - Updated webpack and its configuration to V5
- Moved
app/javascript/packs/application.jstoapp/javascript/application.js - Removed
ruby-sassgem - Added
cssbundling-railsgem and DartSass JS library - Updated SASS stylesheets following the migration to the latest version of the
sasspackage (See below). - Removed
font-awesome-sassgem and used@fortawesome/fontawesome-freenpm package - Issue with
@import 'font-awesome-sprockets';line inapp/assets/stylesheets/application.scss. Removed that line after referring to the latest font-awesome install/setup guide which no longer includes it.
With the removal of Webpacker, the Javascript/SASS code is no longer automaticaly compiled when using the rails server command. It has been replaced by the bin/dev command that launch the rails server and the processes that watch for changes in the SASS and Javascript code.
SASS update : removal of the @import keyword
With the removal of the webpacker gem, the DartSass package has been installed to ensure the compilation of the Sass stylesheet and with it, an update to the Sass version used by the code :
@importkeyword for custom stylesheets has been removed (although we can still import stylesheets from externals packages) and has been replaced by@useand@forward- An
_index.scssfile have to be created in folders containing multiple sass files. Each file have to be included in the index with the@useor@forwardkeyword. - In most cases
@importcan be replaced by@usewhen importing a file. @forwardmakes mixins, functions and variables available when a stylesheet is loaded.- When imported, Sass variables are now namespaced with the file name in which they are declared (ex :
color: colors.$red). A namespace can be renamed (ex :@use "colours" as c;) or removed when included (ex :@use "colours" as *;) - Sass variables are no longer declared globally and have to be included in files where they are used.
For more detailed explanation, please refer to this video : https://www.youtube.com/watch?v=CR-a8upNjJ0
Introduction of RackAttack
Rack Attack is middleware that can be used to help protect the application from malicious activity. You can establish white/black lists for specific IP addresses and also define rate limits.
- Using Rack-attack address vulnerabilities pointed out in password reset and login: there was no request rate limit.#3214
Cleanup of Capybara configuration
- Cleaned up Gemfile by:
- removing gems that were already commented out
- removed selenium-webdriver and capybara-webmock
- removing version restrictions on: danger, font-awesome-sass, webdrivers
- Cleaned up
spec/rails_helper.rbandspec/spec_helper.rb - Simplified the
spec/support/capybara.rbhelper to work with the latest version of Capybara and use its built in headless Chrome driver
Rubocop updates
- Installed rubocop-performance gem and made suggested changes
- Added lib tasks as exclusive from debugger rubocop check after rubocop upgrading to >= v1.45 #3291
GitHub actions updates
- Added node version specification (v16) to eslint, PostgreSQL and MySQL github action to eliminate
digital routine envelopederror #319
New Rake task for updating dependencies
- Added a new
bin/rails update:alltask that will update the gem and JS dependencies and also add thex86_64-linuxenvironment to the bundle's supported platform list
v4.0.2
Bug Fixes
- Updated sans-serif font used in PDF downloads to Roboto since Google API no longer offers Helvetica
- Fixed discrepencies with default/max per_page values for API and UI pagination
- Updated JS that used to call the TinyMCE
setMode()function so that it now callsmode.set()because the former is now deprecated. - Patched an issue that was causing a template's visibility to change to 'organizationally_visible' when saving on the template details page.
- Fixed an issue with the Rails 6 keyword arguments change that was causing the
paginable_sort_linkto fail
Changes
- Added validation with custom error message in research_output.rb to ensure a user does not enter a very large value as 'Anticipated file size'. #3161
- Added popover for org profile page and added explanation for public plan
- Updated the CSV export so that it now includes research outputs
- Change csv file name for statistics from 'Completed' to 'Created'
Developers
v4.0.1
Bug Fixes
- Fixed
bin/rails db:schema:load issuein version 4.0.0 and enhancedbin/setupcommand to improve the installation process #3216 - Added patches to 4.0.0 version for Rails 6 fixes
- Removed translation.io error message from the system email to users
- Added new translations to usage page, feedback notification page and guidance group page
- Accessibility fixes #3211
- Missing form labels - Contact us
- Missing form label - Dashboard - test checkbox
- Missing form labels - Create plan
- Missing form label
- Also went through and fixed errors on Project details, Contributor form, Research Output form and Write Plan
- Fixed potential plan visibility issue
- Added header translation and removed the extra 'Affiliation' row in the downloaded csv file
- Fixed
Tried to load unspecified class: Symbolerror that some users encountered in download page
Developers
- Added EditorConfig file to help maintain constant coding style
- Updated some coding style #3249
- Kept Github Actions using ubuntu-20.04 as the OS for test #3247
Dependency Updates
- Bumped engine.io from 6.2.0 to 6.2.1
- Bumped Webdriver from version 4 to 5.2
- Bumped nokogiri from 1.13.18 to 1.13.9
v4.0.0
Researchers
- Updated the PDF coversheet to include all Contributors
- Fixed an issue that was causing the link to organizational guidance to repeat
Administrators
- Fixed an issue that was impacting API v0 and preventing the batch assignment of users to departments
- Fixed an issue that was preventing admins from performing a search on the Templates page #3217
- Removed case sensitivity from the validation rules for Org and Department names.
- Fixed issues with API v1
- Fixed an issue that was causing plans that were based off of templates with conditional questions to disappear when the user triggered the condition #3163
- Fixed an issue that was causing plans to not appear in the publicly visible if 100% of their questions had not been answered #3086
Developers
This release includes a major upgrade of Rails (5.x to 6.1) and an upgrade from Ruby 2.6 to 2.7.6. Please review the following release notes as well as our upgrade guide and be aware that you will most likely need to adjust/modify any local customizations you may have made within your local fork of the code.
This release includes an upgrade from Ruby 2.6 to Ruby 2.7.6 and Rails 5.x to Rails 6.1!
You will need to do the following:
- Review the new default configuration options for Rails 6.1 and adjust as necessary for your implementation. The config settings can be found in
config/initializers/new_framework_defaults_6_1.rb - Set a
DMPROADMAP_HOSTenvironment variable. Rails 6+ introduces new middleware that helps mitigate DNS rebinding attacks. This includes a hostname whitelist. The value you assign to this environment variable will be added to the whitelist. - Update the
SUPPORTED_LOCALESCLIENT_LOCALESandDEFAULT_LOCALEin theconfig/initializers/translation.rbfor your instance - If you have any raw SQL queries were deprecated in Rails 5.2. You may need to convert these over. See this article
Updates:
- Updated Ruby from 2.6.3 to 2.7.6 #3139
- Updated Rails from 5.2 to 6.1 #3103 #3187
- Updated the TinyMCE editor to v5 and installed the 'oxide' skin #2942
- Switched from Turbolinks to Turbo
- Updated all JS and gem dependencies
- Fixed an issue that allowed researchers to add an ORCID for a contributor that included spaces resulting in URLs that looked like
https://orcid.org// 0000-0000-0000-0000.#3212 - Made some minor modifications to improve query responsiveness on the Contributors, Guidances, Plans, Orgs, Users and Templates pages
- Replaced all occurrences of
update_attributeswithupdatessinceupdate_attributeswas deprecated - Upgraded chart.js which is used on the Usage page to render the bar and pie charts
- You can now set a flag that makes the 'coversheet' checkbox on the Plan Downloads page to be checked by default #3063 #3104
- Made changes to accommodate the new Zeitwerk autoloader (which has stricter convention-over-configuration rules):
- Changed the name of the
JSONLinkValidatorclass file toJsonLinkValidator - Updated models so that any JSON fields have their default values defined prior to serialization
- Updated deprecated occurrences of
record.errors[:model] << 'foo'torecord.errors.add(:model, 'foo') - Updated JS babel configuration
- Updated the
config/environments/*.rbfiles to use the newDMPROADMAP_HOSTenvironment variable to defined theRails.application.routes.default_url_optionsand newconfig.hostssetting. - Added a new
download_coversheet_tickbox_checkedflag to theconfig/initializers/_dmproadmap.rbinitializer that will default the Plans Download page to default that checkbox to be true - Removed the out-of-date eslint package from webpacker. We will investigate re-introducing a JS linter in a future release
- Fix to the
db/seeds.rbfile that is used for new installations so that it uses thefind_or_create_byinstead ofcreate!to prevent duplicates when the DB already exists. - Updated and fixed tests as needed
- Changed the name of the
v3.1.1
This release is primarily a bug fix release from v3.1.0
It is worth moving to fairly soon as it contains a couple of bugs which seriously degrade the user experience.
Fixes include:
- 'expand all/collapse all' buttons in multi-section plans
- 'View All' when looking at templates as Org Admin
- margins and default zoom settings of exported PDFs
- font-face of PDF downloads
- download plan with coversheet
- API calls which were failing due to a timeout.
- plan with conditional questions causing page to go blank (#3163 )
- download template with pre-ticked answers not working (#3104 )
- research outputs metadata standards not always appearing
- sharing plans where plan has to be 100% complete. (#3086 )
New Contributors
- @pengyin-shan made their first contribution in #3151
Full Changelog: v3.1.0...v3.3.1