implementation #1
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "implementation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Take Home Assessment implementation
Comments available for what I'd do if I had more time :)
@ -8,3 +8,2 @@
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^19.1.0",
Latest React has nicer/simpler form action handling
@ -35,1 +35,4 @@
]
},
"devDependencies": {
"html-react-parser": "^5.2.5",
Description comes from JSON as raw HTML, this is a quick solution so we don't trust the HTML too far. But I'd do more research into the cleanest solution.
Extra points for the backend simply storing as markdown instead.
@ -36,0 +36,4 @@
},
"devDependencies": {
"html-react-parser": "^5.2.5",
"react-imask": "^7.6.1"
Many react mask plugins don't work, and very few address accessibility.
If this was a real project I'd pair with designers to find alternative ways to implement these forms without masking, more in line with the GOV.UK design system does.
@ -7,4 +9,3 @@
function App() {
const bands = [skaBand, kpopBand, punkBand];
return (
<div className="App">
Ideally this would be a page where you pick a band, but for now we just hard code
[0]
.@ -0,0 +3,4 @@
function BandDetails({ band }) {
return (
<div className="details">
<img src={band.imgUrl} alt="" />
Backend should return alt text for the images.
@ -0,0 +4,4 @@
return (
<div className="details">
<img src={band.imgUrl} alt="" />
{parse(band.description_blurb)}
Safely parse the HTML with
html-react-parser
, more research needed if this is the most ideal tool/method.@ -11,0 +94,4 @@
<div className="total">
<h3>Total</h3>
<p aria-live="polite">${costToReadable(total)}</p>
Need to test this with an actual screenreader. Should announce when prices change so the user is aware how much their "cart" costs.
@ -11,0 +99,4 @@
<div className="information">
<div className="form-row">
<input
All of these should have
autocomplete
properties for easier autofill.@ -11,0 +127,4 @@
<fieldset className="payment">
<legend>Payment Details</legend>
{/* TODO: regex pattern */}
Currently only checks that anything is entered, given more time I'd write regex for validation (likely against the HTML
pattern
attribute).@ -0,0 +3,4 @@
<header className="header">
<h1>{band.name}</h1>
<div className="header-details">
<time>{band.date}</time> {/* TODO: Format properly */}
Needs pretty icon, to render not as an ugly number but as an elegent date.
Yet, should properly fill out the
<time>
attributes with what the computer friendly timestamp is.@ -0,0 +4,4 @@
<h1>{band.name}</h1>
<div className="header-details">
<time>{band.date}</time> {/* TODO: Format properly */}
<address>{band.location}</address> {/* TODO: Format properly */}
Needs icon, line break.
@ -3,7 +3,7 @@
"id": "flaming-potatoes",
"date": 1683644012000,
"location": "Groove, 125 MacDougal St, New York, NY 10012",
"description_blurb": "<p>We're the Flaming Potatoes, and once you come to this awesome small club performance, you'll be our Best Spuds!</p>.",
Rendered funny with a period after the paragraph? Likely a typo.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.