Skip to content

Improve visibility radio option text on new project page

With the feature flag paginatable_namespace_drop_down_for_project_creation switched on, if the user:

  1. Goes to the Create new project page (http://127.0.0.1:3000/projects/new)
  2. Clicks Create blank project
  3. Selects a private project in the Project URL dropdown

Then the Internal and Public radio options become disabled and shows text like This project cannot be public because the visibility of H5BP Internal Subgroup is internal. To make this project public, you must first change the visibility of the parent group..

This code lives in app/assets/javascripts/project_visibility.js and is sub-optimal. We should update it so that:

  • The text is translatable
  • We don't update the HTML using innerHTML, if possible
Edited by Coung Ngo