mozilla / bedrock

Making mozilla.org awesome, one pebble at a time
https://www.mozilla.org
Mozilla Public License 2.0
1.18k stars 920 forks source link

Evaluate a front-end JS templating library #7561

Closed alexgibson closed 3 years ago

alexgibson commented 5 years ago

Description

Bedrock pages don't have a whole lot of state to manage in general, but there are a few areas when we do often rely on conditional content. Sometimes these types of pages can be a challenge to code and make changes to, because critical logic is often split between templates (localized markup), CSS (state class hooks) and JavaScript (logic to trigger state).

These types of things could potentially be easier to code & reason about, if we used a lightweight, front-end templating library.

Example scenarios:

We should do an evaluation of:

  1. if this makes sense for bedrock.
  2. which (if any) libraries might be suitable for our needs.
  3. which chosen library should we use as a standard.

Some notes:


:yellow_heart: Success Criteria :yellow_heart:

:heavy_exclamation_mark: Risks :heavy_exclamation_mark:

Tasks

hoosteeno commented 4 years ago

@amychurchwell do you think this issue is still likely to get attention in the current sprint?

amychurchwell commented 4 years ago

@hoosteeno was not planning to give this attention before the 22nd. Will begin work on this in the next sprint if that works.

ejregithub commented 4 years ago

Let's discuss a schedule for this.

alexgibson commented 4 years ago

@amychurchwell hi, is this something you're still working on? I can update the roadmap if you need more time on this. I'm curious if we reached a recommendation, as I can think of a few areas this might be useful for in the future.

amychurchwell commented 4 years ago

@alexgibson hi! yes, this got a little buried in the shuffle unfortunately. I can kick this back up tomorrow and get it in a place for discussion/recommendation so we can close it out. What other areas can you think of this being used for? It could affect the libraries/frameworks in the write up.

alexgibson commented 4 years ago

We have some upcoming tasks related to removing legacy jQuery code from pages. For example, the contact pages feature a mobile navigation menu that gets rendered using JS: https://github.com/mozilla/bedrock/issues/8383

amychurchwell commented 4 years ago

I'd like to finish this up after the work in https://github.com/mozilla/bedrock/pull/8391 is complete, if that works for the team?

alexgibson commented 3 years ago

This issue got a little old, so I'm going to close and file a fresh issue to revisit this work.