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

Font, color and margins style for Discussions UI #95

Merged
merged 1 commit into from
Aug 7, 2017

Conversation

roberthouse54
Copy link
Contributor

@roberthouse54 roberthouse54 commented Aug 4, 2017

What are the relevant tickets?

This is the First round of style changes for the discussions. I am going to submit small incremental PRs as I go along with this.

What's this PR do?

Sets some of the basic colors, fonts, etc for discussions.

What Issue is this related to

#85

@alicewriteswrongs alicewriteswrongs self-assigned this Aug 7, 2017
Copy link
Contributor

@alicewriteswrongs alicewriteswrongs left a comment

Choose a reason for hiding this comment

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

just a few comments on the React changes

<Link to="/">Discussions</Link>&nbsp;
<span>&gt;</span>&nbsp;
<Link to={`/channel/${channel.name}`}>{channel.title}</Link>
{channel.title}
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably remain a <Link /> - we show the ChannelBreadcrumbs component on the page for each post, so it supplies a link back to the subreddit the post is from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, that is fine.

@@ -55,6 +56,7 @@ class ChannelPage extends React.Component {
<ChannelSidebar channel={channel} />
</Card>
</div>
<br className="clear"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any way we can avoid using <br />? I just find it yucky, haha

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am open to any solutions you can come up with, although this is in my opinion, a basic failure with the CSS model and contained floats inside divs. But I am open to any way you'd prefer to do this. I do want those divs actually contained inside the container div though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I just don't understand what it's doing, but if I delete this element I don't see any changes in the display on the page. I'll leave it in for now if it's necessary.

@roberthouse54
Copy link
Contributor Author

I will be out today and tomorrow. @aliceriot , can you make the required changes and merge the PR?

@roberthouse54 roberthouse54 mentioned this pull request Aug 7, 2017
6 tasks
@roberthouse54
Copy link
Contributor Author

One further comment:

The channel page UI, and the Home page both use a "Post Summary" component, that displays the Post title, post author, number of comments, and upvoting. The Post Details page is currently reusing this same component. But we should really create a different component for the Post Details page as the design is really not the same as it is on the channel/home page.

@alicewriteswrongs
Copy link
Contributor

On the PostSummary component, it basically has two modes. On a post detail view it shows more information (like the text if its a text post), displays slightly differently, etc. Do you think that we could just continue to build out the two different display modes? If we want to style them differently we could have a css class which only appears on the 'expanded' view, for instance. There is a fair amount of display which is more or less identical looking in the designs (i.e. we show the link title, the author, etc) which is why I re-used the component for the 'channel' view.

@alicewriteswrongs
Copy link
Contributor

the post display is a little messed up:

post_display

I'm going to make a few quick changes to restore the spacing

@codecov-io
Copy link

codecov-io commented Aug 7, 2017

Codecov Report

Merging #95 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
+ Coverage   95.52%   95.53%   +0.01%     
==========================================
  Files          89       89              
  Lines        2033     2038       +5     
  Branches       63       63              
==========================================
+ Hits         1942     1947       +5     
  Misses         82       82              
  Partials        9        9
Impacted Files Coverage Δ
static/js/components/ChannelSidebar.js 100% <ø> (ø) ⬆️
static/js/components/PostDisplay.js 100% <ø> (ø) ⬆️
static/js/containers/ChannelPage.js 100% <ø> (ø) ⬆️
static/js/components/ChannelBreadcrumbs.js 100% <ø> (ø) ⬆️
static/js/containers/HomePage.js 100% <ø> (ø) ⬆️
static/js/components/Card.js 100% <100%> (ø) ⬆️
static/js/components/Card_test.js 100% <100%> (ø) ⬆️
static/js/components/PostDisplay_test.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68ecf6e...e4130ad. Read the comment docs.

@roberthouse54
Copy link
Contributor Author

The post display component is identical on the channel page and the home page, and yse I did see that there is an "expanded" version. But I think the layout on the actual post page is significantly different enough to warrant a different component and different html. The # of comments is down below, next to the comments UI, the upvoting is in a different location, etc

@roberthouse54
Copy link
Contributor Author

About using the break with class="clear"... yes it is a workaround. And I think you might not see any visual changes on the page. But the two floated divs are not actually contained inside the container div. I do want to have that working,as I think, otherwise, we will not be able to apply box property rules to the container etc.

@alicewriteswrongs
Copy link
Contributor

it seems like setting display: flex on the container div (.double-column or .single-column) has the same effect, I think?

@alicewriteswrongs
Copy link
Contributor

I'll leave it as-is for now and we can discuss when you're in

@rhysyngsun rhysyngsun self-assigned this Aug 7, 2017
Copy link
Contributor

@rhysyngsun rhysyngsun left a comment

Choose a reason for hiding this comment

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

look good functionally, but noted one thing:

@@ -46,19 +44,23 @@ export default class PostDisplay extends React.Component {
return (
<div className="post-summary">
<div className="upvotes">
<button> &uArr;</button>
<img className="upvote-arrow" src="/static/images/upvote_arrow.png" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for the move away from a <button>? This has accessibility issues and has no native disabled behavior (which is something I'm doing in #93, which will merge soon too).

Copy link
Contributor

Choose a reason for hiding this comment

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

let's defer to what you have in #93 for now

Copy link
Contributor

@rhysyngsun rhysyngsun left a comment

Choose a reason for hiding this comment

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

👍 when tests pass

This adjusts styles on a few things, mainly tweaking colors and
adjusting layout / margins. It also:

- adds a title prop to `<Card />`, which will add a consistently
formatted title
- does some CSS cleanup / reorganization
@alicewriteswrongs alicewriteswrongs merged commit e4130ad into master Aug 7, 2017
@alicewriteswrongs alicewriteswrongs deleted the rh-discussions-styles branch August 7, 2017 20:32
alicewriteswrongs added a commit that referenced this pull request Aug 9, 2017
This just removes a line which was deleted in #95 and reincluded in #90

pr #103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants