-
Couldn't load subscription status.
- Fork 0
Feedback #1
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
base: feedback
Are you sure you want to change the base?
Feedback #1
Conversation
added blog cards.
… to blog cards on homepage.
changed file paths to be in folders and added two functioning buttons…
changed source of homepage photos.
added icon, about functioning in Navbar and bootstrap layout for abou…
…s and properly linked, placeholder photos on all blog pages.
added about author image circles
aesthetics updated and added contact form.
unfinished changes
added overlay text popouts to images. Added about author files.
added blogpageinfo props
set up props to reveal three blogs each
added bios and blog 7
fixed shit show blog styling.
fixed right nav bar and failed comment sectin attempt lol.
added blog content
Work break styling
finishing touches.
code clean up.
added more semantic commenting.
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.
Provisional Grade: 70%
Keep in mind, 20% of your final grade is acquired from your partner survey and review results. The remaining 10% missing from your grade is due to lack of DRY in certain areas, and the big chunk is the missing singular blog component. Mostly just best practices and understanding of how React can work with singular components. Let me know if you have any questions!
| <Route path="/homebreak/blogs" render={(props) => ( | ||
| <HomeBreakBlogs BlogPageInfo={BlogPageInfo} {...props} /> | ||
| )} /> | ||
| <Route path="/playbreak/blogs" render={(props) => ( | ||
| <PlayBreakBlogs BlogPageInfo={BlogPageInfo} {...props} /> | ||
| )} /> | ||
| <Route path="/workbreak/blogs" render={(props) => ( | ||
| <WorkBreakBlogs BlogPageInfo={BlogPageInfo} {...props} /> | ||
| )} /> |
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 could be made more clean. If you include the path you're aiming for inside of your BlogPageInfo, then you can loop through and create these with a loop. It'd look something like...
BlogPageInfo.map((obj, index) => {
<Route path={obj.routePath} render={(props) => (
<HomeBreakBlogs BlogPageInfo={obj} {...props} />
)} />
})
Of course, you'd have to update references and what not.
| <WorkBreakBlogs BlogPageInfo={BlogPageInfo} {...props} /> | ||
| )} /> | ||
| <Route path="/about" render={(props) => ( | ||
| <AboutPage AuthorInfo={AuthorInfo} {...props} /> |
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.
In general, you should always pass properties in camelCase format. This means AuthorInfo here becomes authorInfo if written correctly. You have to update the reference in the file as well (so in this instance, the AboutPage component file will need to change from props.AuthorInfo to props.authorInfo.
| <i class="fab fa-facebook"></i> | ||
| <Footer /> |
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 saw this during the presentation, you had a random thing of links at the bottom, and a random social media icon. Just remove these and keep the FooterNavbar, and throw the links into the FooterNavbar component.
| import Carousel from "react-bootstrap/Carousel"; | ||
| import PhotoOne from "../images/carousel/Pink.jpeg"; | ||
| import PhotoTwo from "../images/carousel/Blue.jpeg"; | ||
| import PhotoThree from "../images/carousel/Orange.jpeg"; |
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.
As a general rule, import components in PascalCase, and properties and other references in camelCase. So you'd keep Carousel as it is, but change the others to photoOne, photoTwo, etc.
| <Carousel.Item> | ||
| <img className="d-block w-100" src={PhotoOne} alt="First slide" /> | ||
| </Carousel.Item> | ||
| <Carousel.Item> | ||
| <img className="d-block w-100" src={PhotoTwo} alt="Second slide" /> | ||
| </Carousel.Item> | ||
| <Carousel.Item> | ||
| <img className="d-block w-100" src={PhotoThree} alt="Third slide" /> | ||
| </Carousel.Item> |
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.
Isn't super DRY, try something like this:
[photoOne, photoTwo, photoThree].map((photoSrc, index) => {
<Carousel.Item>
<img className="d-block w-100" src={photoSrc} alt="Slide image..." />
</Carousel.Item>
})
This way we clean up a good amount of that code. You may have to fiddle with that code a bit to get it to work!
| function ContactModal() { | ||
| const [show, setShow] = useState(); | ||
|
|
||
| const handleClose = () => setShow(false); | ||
| const handleShow = () => setShow(true); | ||
|
|
||
| return ( | ||
| <> | ||
| <Button variant="outline-secondary" onClick={() => handleShow()}> | ||
| Send | ||
| </Button> | ||
|
|
||
| <Modal show={show} onHide={() => handleClose()}> | ||
| <Modal.Header closeButton> | ||
| <Modal.Title> | ||
| <Mailbox /> <Heart /> | ||
| </Modal.Title> | ||
| </Modal.Header> | ||
| <Modal.Body> | ||
| Signed, sealed, delivered. We will be in touch soon! | ||
| </Modal.Body> | ||
| <Modal.Footer> | ||
| <Button variant="secondary" onClick={handleClose}> | ||
| <HandThumbsUp /> | ||
| </Button> | ||
| </Modal.Footer> | ||
| </Modal> | ||
| </> | ||
| ); | ||
| } |
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.
Modal is not erasing information after being submitted. It should wipe all fields after hitting the submit button.
| <Col> | ||
| <Image className="author" id="fadein" src={props.AuthorInfo[0].photo} roundedCircle onClick={() => setAuthorClicked(0)} /> | ||
| </Col> | ||
| <Col > | ||
| <Image className="author" id="fadein" src={props.AuthorInfo[1].photo} roundedCircle onClick={() => setAuthorClicked(1)} /> | ||
| </Col> | ||
| <Col > | ||
| <Image className="author" id="fadein" src={props.AuthorInfo[2].photo} roundedCircle onClick={() => setAuthorClicked(2)} /> | ||
| </Col> |
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.
Not DRY. Use a map over the props.AuthorInfo array here in order to fix this.
| <Container className="blog-content"> | ||
| <h1 className="blog-title">{props.BlogPageInfo[blogClicked].title}</h1> | ||
| <Container className="subtitle-container"> | ||
| <h3 className="blog-subtitle">{props.BlogPageInfo[blogClicked].subtitle}</h3> | ||
| </Container> | ||
| <br /> | ||
| <Image className="homebreak-author-avatar" src={props.BlogPageInfo[blogClicked].authoravatar} alt="" /> | ||
| <h6 className="blog-author">Authored By {props.BlogPageInfo[blogClicked].author} <Badge pill variant="dark">Follow</Badge></h6> | ||
| <br /><h6 className="blog-date-time"><Calendar /> {props.BlogPageInfo[blogClicked].date}</h6> | ||
| <p className="socials"> <Facebook /> <Twitter /> <Instagram /> <Bookmark /> <ThreeDotsVertical /></p> | ||
| <img className="blog-image" src={props.BlogPageInfo[blogClicked].image} alt="" /> | ||
| <p className="photo-credit">{props.BlogPageInfo[blogClicked].photocredit}</p> | ||
| <p className="blog-quote">{props.BlogPageInfo[blogClicked].quote}</p> | ||
| <hr className="line-break" /> | ||
| <p className="blog-intro-text">{props.BlogPageInfo[blogClicked].introtext}</p> | ||
| <hr className="line-break" /> | ||
| <p className="blog-text">{props.BlogPageInfo[blogClicked].contentblockone}</p> | ||
| <p className="blog-header">{props.BlogPageInfo[blogClicked].headerblocktwo}</p> | ||
| <p className="blog-text">{props.BlogPageInfo[blogClicked].contentblocktwo}</p> | ||
| <p className="blog-header">{props.BlogPageInfo[blogClicked].headerblockthree}</p> | ||
| <p className="blog-text">{props.BlogPageInfo[blogClicked].contentblockthree}</p> | ||
| <hr className="line-break" /> | ||
| </Container> |
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.
It's tough to not make this messy, but you probably should have looked into some libraries that allow you to save HTML elements inside of a string and compile it using React. This would have been much better with your blog format... here's a library I'd think of Interweave...
| @@ -0,0 +1,57 @@ | |||
| /* Imported React and Hook */ | |||
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.
It's hard to describe, but your blog pages in general are not DRY. You should have one single blog component that can handle all of the various information you're using from your Array of blogs. Right now, you have three separate blog components which are being utilized. Cleaning it up with Interweave, and figuring out how to properly use state (since the component is re-rendering, using state here would be simple), you can figure out how to use one blog page.
👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to
mainsince the assignment started. Your teacher can see this too.Notes for teachers
Use this PR to leave feedback. Here are some tips:
mainsince the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue + (plus sign). To learn more about comments, read “Commenting on a pull request”.main. Click a commit to see specific changes.For more information about this pull request, read “Leaving assignment feedback in GitHub”.
Subscribed: @Abby-Lyttle @emlindly