Skip to content
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

dynamic Article page created #28

Closed
wants to merge 2 commits into from

Conversation

andreacavagna01
Copy link

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: #8

What is the new behavior?

Added dynamic article page that load mocked data from gatsby-node.js

-

Does this introduce a breaking change?

  • Yes
  • No

Other information

@andreacavagna01
Copy link
Author

Added Assets template to load static banner in templates, static folder is not the correct way to do it

Copy link
Collaborator

@antoniolofiego antoniolofiego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this. We will likely also need a similar approach for the profile page, but I can handle it through these snippets.

import ArticleThumbnail from '../components/ArticleThumbnail';
import FeaturedArticle from '../components/FeaturedArticle';
import NewsCarousel from '../components/NewsCarousel';
const marked = require("marked");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's maintain a consistent import statement.
import marked from 'marked'

@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import { Link } from 'gatsby';
import AccountDropdown from './AccountDropdown';
import logo from '../assets/banner.png';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might introduce some merge conflicts with currently in-development features, but it's the correct way of handling it

@@ -25,5 +25,13 @@ html {
@apply flex-grow
}

.article-content {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a consistent way of handling stylesheets, there are currently two separate ones for no specific reasons. I would say that we can either build a proper component stylesheet that is reused consistently across the page, or we continue with inline styling like most of the components have so far. This might interest also @Bruck1701.
Let me know what you guys think!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree that we should try to keep everything as consistent as possible!
Even though I used inline styling, I think it would be better to have a component stylesheet.
Inline styling can make it harder to change the code uniformly later, right?

@@ -1,14 +1,15 @@
import React from 'react';
import { Link } from 'gatsby';
import { FaTwitter, FaDiscord, FaGithub, FaLinkedin } from 'react-icons/fa';
import logo from '../assets/banner.png';

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See Header's comment.

})
})
// highlight-end
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, I absolutely hate when APIs mix requires and imports.

@antoniolofiego antoniolofiego changed the base branch from master to dev August 5, 2020 13:57
@antoniolofiego
Copy link
Collaborator

I just realized you have been developing this from the master branch. The dev branch is the one used for development and the master is severely behind commits and features.

@antoniolofiego antoniolofiego self-assigned this Aug 5, 2020
@antoniolofiego antoniolofiego added the enhancement New feature or request label Aug 5, 2020
@antoniolofiego antoniolofiego added this to the Full component suite milestone Aug 5, 2020
@antoniolofiego antoniolofiego linked an issue Aug 5, 2020 that may be closed by this pull request
Copy link
Contributor

@Bruck1701 Bruck1701 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was decided that the article pages will be posted on hashnode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Article Page
3 participants