-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local footer styling to match Stanford Basic subtheme #5
base: 1.x
Are you sure you want to change the base?
Conversation
@pookmish Can you take a look at this PR and offer suggestions for improvement? |
import {LockClosedIcon} from "@heroicons/react/24/outline"; | ||
import Link from "next/link"; | ||
|
||
const WebLogin = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with most of this PR, except this component. Since it's a decoupled site, we'll basically be hiding the web login and hiding the drupal side. At this time I'd like to remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. That makes sense. I removed it.
<div> | ||
<div className="su-signup-form"> | ||
<Wysiwyg html={suLocalFootFIntro?.processed}/> | ||
<Subscribe/> | ||
</div> | ||
|
||
<Wysiwyg html={suLocalFootTrCo?.processed}/> | ||
|
||
</div> | ||
<Wysiwyg html={suLocalFootTrCo?.processed} className="text-19"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section could probably have more simple markup:
<div>
<Wysiwyg html={suLocalFootFIntro?.processed}/>
<Subscribe/>
<Wysiwyg html={suLocalFootTrCo?.processed} className="text-19"/>
</div>
And even more so, does the wrapping div need to be there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wrapping is not needed and had some wrong thinking behind it.
src/components/elements/address.tsx
Outdated
@@ -38,7 +38,7 @@ const Address = ({ | |||
} | |||
|
|||
return ( | |||
<address {...props}> | |||
<address {...props} className="text-16 leading-9 rs-mb-3"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember that the Address element is used across the whole site. If you want to apply these classes in the footer, you should apply them where the component is used. That's what the {...props}
allows us to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I moved it to the footer instead. I'll look again in the am. I might have missed the point.
<form> | ||
<input className="h-[3.5rem] w-[25rem] block type-0" type="email" id="" aria-label="signup email" name="signup email" placeholder="email address" /> | ||
<button className="button m-t-3 my-2 h-[35px]" type="submit" id="signup-submit"> | ||
Sign-up | ||
</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This form wouldn't submit anywhere the way it is. At this time, we should just remove it. I don't believe people use the local footer signup form anywhere anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think many sites do but ChEM-H does. They aren't going to use this at the moment. I removed it. It'd be interesting to know how many actually use it.
@@ -3,7 +3,9 @@ import type {Meta, StoryObj} from '@storybook/react'; | |||
import LocalFooter from "@components/config-pages/local-footer"; | |||
import {ComponentProps} from "react"; | |||
|
|||
type ComponentStoryProps = ComponentProps<typeof LocalFooter> & {} | |||
type ComponentStoryProps = ComponentProps<typeof LocalFooter> & { | |||
numberoflinks: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ease of reading and consistent code styles, it's good to use camel case characters. numberOfLinks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the name of numberOfLinks
and noticed I had the same style problem in the gallery page so I fixed that too.
for (let i=0; i< numberOfLinks; i++) { | ||
linkList.push("<a href='http://localhost'>Primary Link</a>") | ||
} | ||
return <LocalFooter {...args} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pookmish Can you point out where this is wrong? I thought I'd be able to pass the linkList
into the return like <LocalFooter {linkList, ...args} />
but that was an error. I want the control to just add more links so the client can see what happens in the display when they add lots of links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're creating an array, but you're not doing anything with the array. Also links are typically structured objects, so you'd need to do something like linkList.push({url: "http:/foobar", title: "foo"})
But then once you build the array, you need to set it to the args. args.configPage.[your_field_name] = linkList
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean like this?
args: {
configPage: {
suLocalFootAction: linkList,
},
de0308a
to
d61b08b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still requires fixes to the storybook story
6524635
to
a9f4c29
Compare
NOT READY FOR REVIEW
Summary
-- How can we include the lockup that we use in the header? Is there a way to make the footer one use the main one in the story? I read a little about storybook compositions. Maybe that is what I'm looking for?
Review By (Date)
Criticality
Urgency
Review Tasks
Setup tasks and/or behavior to test
drush cr ; drush ci
Site Configuration Sync
Front End Validation
Backend / Functional Validation
Code
Code security
General
Affected Projects or Products
Associated Issues and/or People
@mention
them here)Resources