Skip to content

Spaces#1094

Merged
fbacall merged 29 commits into
masterfrom
spaces-themes
Jul 3, 2025
Merged

Spaces#1094
fbacall merged 29 commits into
masterfrom
spaces-themes

Conversation

@fbacall

@fbacall fbacall commented Apr 4, 2025

Copy link
Copy Markdown
Member

Summary of changes

  • Introduces the Space feature - independently managed spaces within TeSS, each with their own catalogue of events, materials etc. and some basic customization.
  • Spaces can be created by administrators, with a title, description, host, theme and logo.
  • Users can be given roles within a space (currently only role available is space administrator - who can change the customization of their space).
  • The current space is determined by looking at the Host header of the HTTP request. If no space exists for that host, the Default Space is set.
  • Any resources created in the current space are only visible in that space (unless a filter is enabled).
  • Currently Events, Materials, Collections, Learning Paths and Workflows are space-limited, whereas Content Providers and Users are shared across all spaces.

Motivation and context

Part of the mTeSS-X OSCARS project.

Screenshots

image

image

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree
    to license it to the TeSS codebase under the
    BSD license.

Comment thread app/views/spaces/_form.html.erb Outdated
existing_items_method: :administrators %>

<div class="form-group">
<%= f.submit ( f.object.new_record? ? "Register" : "Update") + " space", class: 'btn btn-primary' %>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should go through i18n

@cwant cwant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a brief scan (view mostly) to locate spots where I saw some strings that don't go through i18n.

Comment thread app/views/spaces/index.html.erb Outdated
Create space
<% end %>
<% end %>
<%= info_button("What are spaces?", hide_text: true) do %>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This (and following line) should go through i18n

Comment thread app/views/spaces/index.html.erb Outdated
<div class="text-right my-3">
<% if policy(:space).create? %>
<%= link_to new_space_path, class: 'btn btn-primary' do %>
Create space

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should go through i18n

@@ -0,0 +1,3 @@
<%= info_box('What are space?') do %>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i18n

@@ -0,0 +1,12 @@
<%- model_class = Space -%>
<div class="page-header">
<%= page_title(t('.title', default: [:'helpers.titles.new', 'New %{model}'], model: model_class.model_name.human.titleize.downcase)) %>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i18n

@fbacall
fbacall marked this pull request as ready for review May 12, 2025 08:38
@fbacall
fbacall requested a review from Copilot May 12, 2025 09:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the Multi-Space feature to TeSS, enabling independently managed spaces with custom theming and content segregation. The key changes include:

  • Adding a link to a themes directory in the asset manifest to support space-specific styling.
  • Updating the README to include documentation on configuring and using multi-space TeSS.

Reviewed Changes

Copilot reviewed 83 out of 101 changed files in this pull request and generated no comments.

File Description
app/assets/config/manifest.js Changed asset linking to use a themes directory for CSS files.
README.md Added a section with documentation for the multi-space feature.
Files not reviewed (18)
  • app/assets/images/themes/blue: Language not supported
  • app/assets/images/themes/default: Language not supported
  • app/assets/images/themes/green: Language not supported
  • app/assets/images/themes/space: Language not supported
  • app/assets/javascripts/templates/autocompleter/user_id.hbs: Language not supported
  • app/assets/stylesheets/application.scss: Language not supported
  • app/assets/stylesheets/bootstrap-tweaks.scss: Language not supported
  • app/assets/stylesheets/home.scss: Language not supported
  • app/assets/stylesheets/icons.scss: Language not supported
  • app/assets/stylesheets/learning-paths.scss: Language not supported
  • app/assets/stylesheets/masonry.scss: Language not supported
  • app/assets/stylesheets/mixins/mixins.scss: Language not supported
  • app/assets/stylesheets/mixins/variables.scss: Language not supported
  • app/assets/stylesheets/themes/blue.scss: Language not supported
  • app/assets/stylesheets/themes/classic.scss: Language not supported
  • app/assets/stylesheets/themes/default.scss: Language not supported
  • app/assets/stylesheets/themes/green.scss: Language not supported
  • app/assets/stylesheets/themes/mixins/_modern_base.scss: Language not supported
Comments suppressed due to low confidence (1)

app/assets/config/manifest.js:2

  • Removing the link to application.css may result in missing default styles if those styles are not migrated to the themes directory. Please ensure that all necessary styles from application.css are included in or referenced by the themes directory.
//= link_directory ../stylesheets/themes .css

@fbacall
fbacall merged commit d37e6f2 into master Jul 3, 2025
11 checks passed
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.

3 participants