Update legacy themes

Created on 5 November 2024, 4 months ago

Problem/Motivation

There are currently 3 themes that originate from Opigno (see lms_theme()):

  • lms_lp_step_activity
  • lms_lp_step_module
  • lms_lp_step_module_activity

All 3 are used for a single element: course navigation block that usually is placed in a sidebar. We can simplify that as much as possible, possibly use a single theme and template for the entire thing and rename so we don't have "lp" anywhere.

Details to be refined by a frontend engineer.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Courses and lessons

Created by

πŸ‡΅πŸ‡±Poland Graber

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Graber
  • πŸ‡¨πŸ‡¦Canada arvana Canada

    There are two possible approaches that I think would work for themeing the front end:

    1. Minimalist: add module CSS via libraries.yml for just the LMS elements, including course navigation block. These styles could then be overwritten by the end-user's custom site theme.
       
    2. Full site: create a custom subtheme of one of the popular Bootstrap themes that applies to the whole site and creates a full LMS site experience, Γ‘ la Opigno. This could then be customized by the end-user to suit their site needs.

    These two approaches are not mutually exclusive. Just wondering if I take on the front end design which would be most helpful to focus on first.

  • πŸ‡«πŸ‡·France G4MBINI BΓ¨gles

    What do you think of using a new generation theming approach with UI Suite Initiative (that is leveraging SDC and new Icon framework) ?

    Many themes are already available like :

    • UI Suite Bootstrap
    • or UI Suite DaisyUI

    We could support the use of our ecosystem and also be available for a discovery meeting !

    Don't hesitate to contact us. We are available on slack at #ui-suite-initiative ;)

  • πŸ‡«πŸ‡·France G4MBINI BΓ¨gles

    You could also have a look at our last presentation of UI Patterns 2 @Drupalcon Barcelona for better understanding of the approach (regarding Components) --> https://www.youtube.com/watch?v=75wRtmpczOM&list=PLtGBRax0Lj4TXurFMpnd-y...

  • πŸ‡΅πŸ‡±Poland Graber

    I'd go for absolutely minimalist approach here, without even adding any css, just convert those templates to something more simple or even completely drop them and for example use Core #item_list in place of lms_lp_step_module_activity.
    As little and as clean as possible here and any work in an ecosystem theme to make this awesome.

  • πŸ‡«πŸ‡·France G4MBINI BΓ¨gles

    With UI Suite modules you have the ability to connect data and design directly in the UI, so only config threw manage display, layout builder, views, block layout, ...

    When it's not possible (10-20% of the time) to "site build" you can use UI Patterns in code with twig include function or in php with drupal_render function.

  • πŸ‡¨πŸ‡¦Canada arvana Canada

    Seems like there are two issues, the original intent was what to do with the lms_lp_step_* themes and I agree that they should just be dropped. Using #item-list seems like a great solution.

    Then there is the question of whether the LMS project should offer a whole-site theme so it can be more-or-less a drop-in replacement for Opigno. Maybe this should be discussed in a separate issue? The more I think about it the more it seems to me that it's not necessary and should be left in the hands of each site builder.

    On the other hand, exposing all of the LMS elements for easy styling by front-end designers would be a kind thing to do. Maybe I'm too old-school but my first instinct is to include a CSS file in the module that categorizes and lists all of the elements for styling, and allows front-end designers to just copy those into their site theme for customization.

    I'm also getting up to speed on UI Suite, it may take me a while to wrap my head around it!

  • πŸ‡§πŸ‡·Brazil btriest

    I would also go for the minimalist approach. It gives more flexibility. The module would have the functionality and really basic css. And separately we could provide themes (one type) /ui suite (multiple layouts/colors in one theme) solutions. Recipes come to mind realizing that.

  • πŸ‡¬πŸ‡§United Kingdom catch

    Seems like there are two issues, the original intent was what to do with the lms_lp_step_* themes and I agree that they should just be dropped. Using #item-list seems like a great solution.

    I'm very +1 to this and it's what I think we should do in this issue. We can add theme suggestions so they're easier to customise.

    Then there is the question of whether the LMS project should offer a whole-site theme so it can be more-or-less a drop-in replacement for Opigno. Maybe this should be discussed in a separate issue? The more I think about it the more it seems to me that it's not necessary and should be left in the hands of each site builder.

    I think this is worth an issue to discuss, however my inclination would be that we should try to provide UI suite components and think towards compatibility with experience builder and the theme builder that eventually will come with that, as opposed to developing a theme as such.

    Neither me nor @graber have any short or medium plans for a distribution, I think there is a place for a recipes-based distribution for Drupal LMS eventually (along similar lines to Drupal CMS), but we don't currently have a client who would need that and aren't planning to try to sell Drupal LMS as a 'product' or anything, so it's very far down the list of priorities for us. Although if someone else wanted to get that up and running it could be interesting.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States mindewen
  • πŸ‡¬πŸ‡§United Kingdom catch
Production build 0.71.5 2024