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

Align right panel with welcome title #2229

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/styles/panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import 'z-indices';

.panel-padding {
padding: 2rem 1.5rem 2rem 2.2rem;
padding: 0 1.5rem 2rem 2.2rem;
}

#app-wrapper {
Expand Down
17 changes: 9 additions & 8 deletions frontend/src/views/c-authorship.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<template lang="pug">
#authorship
.panel-title
span Code Panel
.toolbar--multiline
a(
v-if="activeFilesCount < selectedFiles.length",
v-on:click="toggleAllFileActiveProperty(true)"
) show all file details
a(v-if="activeFilesCount > 0", v-on:click="toggleAllFileActiveProperty(false)") hide all file details
h2
Copy link
Member

Choose a reason for hiding this comment

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

Was this h2 added to provide padding or for semantic reasons? Because the .toolbar--multiline wouldn't be a heading right?

Copy link
Author

Choose a reason for hiding this comment

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

Without the h2, the Code Panel will appear at the top of the screen, above the title.

without h2

If .toolbar--multiline is not included in h2, it appears on the line below instead.

not in h2

The expected behaviour is as follows:

expected

Copy link
Member

Choose a reason for hiding this comment

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

It may be possible to align by adding top padding for these elements instead of making them both h2, but this works well enough.

.panel-title
span Code Panel
.toolbar--multiline
a(
v-if="activeFilesCount < selectedFiles.length",
v-on:click="toggleAllFileActiveProperty(true)"
) show all file details
a(v-if="activeFilesCount > 0", v-on:click="toggleAllFileActiveProperty(false)") hide all file details
.panel-heading
a.group-name(
v-bind:href="info.location", target="_blank",
Expand Down
23 changes: 12 additions & 11 deletions frontend/src/views/c-zoom.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<template lang="pug">
#zoom(v-if="filteredUser")
.panel-title
span Commits Panel
.toolbar--multiline(v-if="filteredUser.commits.length && totalCommitMessageBodyCount")
a(
v-if="expandedCommitMessagesCount < totalCommitMessageBodyCount",
v-on:click="toggleAllCommitMessagesBody(true); toggleDiffstatView(true);"
) show all commit details
a(
v-if="expandedCommitMessagesCount > 0",
v-on:click="toggleAllCommitMessagesBody(false); toggleDiffstatView(false);"
) hide all commit details
h2
.panel-title
span Commits Panel
.toolbar--multiline(v-if="filteredUser.commits.length && totalCommitMessageBodyCount")
a(
v-if="expandedCommitMessagesCount < totalCommitMessageBodyCount",
v-on:click="toggleAllCommitMessagesBody(true); toggleDiffstatView(true);"
) show all commit details
a(
v-if="expandedCommitMessagesCount > 0",
v-on:click="toggleAllCommitMessagesBody(false); toggleDiffstatView(false);"
) hide all commit details
.panel-heading
.group-name
span(
Expand Down
Loading