hackforla / website

Hack for LA's website
https://www.hackforla.org
GNU General Public License v2.0
324 stars 760 forks source link

Edit documentation: `DR: img tag` #4363

Open JessicaLucindaCheng opened 1 year ago

JessicaLucindaCheng commented 1 year ago

Dependency

Overview

We need to edit a decision record DR: img tag so that it has content that is helpful in understanding our standards for img HTML tags.

Action Items

Resources/Instructions

JessicaLucindaCheng commented 1 year ago

Issue

In our codebase, we are not consistent with whether we apply an ending slash for img HTML tags.

Problem Statement

In our current codebase, we use both <img...> and <img.../>.

Example of code with <img...>: https://github.com/hackforla/website/blob/706d7ce3628f9958cda525201c7c444d3d57d21b/pages/404.html#L12

Example of code with <img.../> https://github.com/hackforla/website/blob/706d7ce3628f9958cda525201c7c444d3d57d21b/pages/donate.html#L18

Potential Solution

Use the img HTML tag without an ending slash meaning <img...> (Source 1).

Feasibility Determination

This is feasible because we only use HTML. An ending slash in an img tag is needed for XHTML and XML (Source 2), which we don't use.

Sources

  1. https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element
  2. https://stackoverflow.com/a/15149657
github-actions[bot] commented 1 year ago

Hi @JessicaLucindaCheng, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

JessicaLucindaCheng commented 1 year ago

Once this issue is in the New Issue Approval column, a dev lead needs to review the issue and edit this issue so that it is ready for a PM to prioritize it.

vraer commented 1 year ago

@JessicaLucindaCheng I've added this decision record to my forked wiki repo in the sandbox-wiki branch.

After talking to @ExperimentsInHonesty yesterday, I tried updating the ci.yml and mkdocs.yaml files with the necessary plugins and markdown extensions for the decision records to display properly on the wiki. Unfortunately, things didn't go as planned, so that needs fixing, but you can still get the gist if you take a look.

Feel free to share any thoughts or suggestions you might have.

JessicaLucindaCheng commented 1 year ago

@vraer Thanks for adding the DR to the wiki and making edits that improved upon what I wrote! Looking at the Markdown file, the content LGTM!

github-actions[bot] commented 1 year ago

Hi @vraer, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

JessicaLucindaCheng commented 1 year ago
github-actions[bot] commented 8 months ago

Hi @JessicaLucindaCheng, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

ExperimentsInHonesty commented 8 months ago

@JessicaLucindaCheng will revise the draft in a comment below and then add this to the list of pages that need to get added to the wiki, keeping in mind that its actually a re-write

JessicaLucindaCheng commented 8 months ago

Tasks

JessicaLucindaCheng commented 8 months ago

Issue

None

Problem Statement

In our codebase, we are not consistent with whether we apply an ending slash for img HTML tags.

Example of code with <img...>:

<img src="/assets/images/404.svg" alt="404">

Example of code with <img.../>

<img class="donate-banner-icon" src="/assets/images/donate/solidarity-pana.svg" alt="" />

Potential Solution

Use the img HTML tag without an ending slash meaning (Source 1).

Feasibility Determination

This is feasible because we only use HTML. An ending slash in an img tag is needed for XHTML and XML (Source 2), which we don't use.

Sources

  1. https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element
  2. https://stackoverflow.com/a/15149657
JessicaLucindaCheng commented 8 months ago

@ExperimentsInHonesty

@JessicaLucindaCheng will revise the draft in a comment below and then add this to the list of pages that need to get added to the wiki, keeping in mind that its actually a re-write