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

Add sections pages fixes #500

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions app/assets/stylesheets/tpi/_bubble-chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ $legend-image-width: 60px;
width: 100%;
/* CSS GRID */
display: grid;
grid-row-gap: 4px;
align-items: center;

&--sectors {
Expand Down Expand Up @@ -214,7 +213,7 @@ $legend-image-width: 60px;
.bubble-chart__level {
border-right: calc(#{$tape-height / 2}) dotted $tape-color;
position: relative;
height: 20%;
height: 60%;

}

Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/tpi/_nested-dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
&__title-header {
display: flex;
flex-direction: column;
font-size: 16px;

small {
margin-top: -7px;
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/tpi/_selector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
justify-content: space-between;
cursor: pointer;

.selector__input {
border: 0;
}

.selector__value {
width: 100%;
margin-right: 16px;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/tpi/charts/companies_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ $tpi-level-chart-colors: #86A9F9 #5587F7 #2465F5 #0A4BDC #083AAB #9747FF;
width: 100%;
font-size: $size-5;
border-radius: 0;
height: 30px;
height: 40px;

&:focus {
height: 30px;
height: 40px;
}
}
}
Expand Down
18 changes: 16 additions & 2 deletions app/assets/stylesheets/tpi/pages/company.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
.change-view {
margin-top: 1.5rem;
margin-bottom: 1.5rem;

.buttons {
justify-content: end;
@include until($desktop) {
// flex-direction: column;
justify-content: center;
}
}
}

.companies-header {
Expand All @@ -15,12 +23,15 @@
color: white;
line-height: 40px;
margin-right: 10px;
@include until($desktop) {
margin-right: 0;
}
}

@include until($desktop) {
padding: 0 0.75rem;
padding-inline: 0 !important;
font-size: $size-7;
height: 60px;
height: auto;
font-family: $font-family-regular;
}
}
Expand All @@ -35,6 +46,9 @@

.summary-boxes {
margin-top: 1.5rem;
@include until($desktop) {
margin-top: 0;
}
}

.summary-box {
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/tpi/pages/sector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ $tape-color: rgba(25, 25, 25, 0.1);
padding-inline: 0 !important;
font-size: $size-7;
height: auto;
padding-top: 40px;
font-family: $font-family-regular;

}
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/components/tpi/charts/bubble/Chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const BubbleChart = ({ levels, sectors }) => {

const levelsSignature = levels && Object.keys(levels[Object.keys(levels)[0]]);

const GRID_HEIGHT = parsedData.length * SINGLE_CELL_SVG_HEIGHT + 150;
const GRID_HEIGHT = parsedData.length * SINGLE_CELL_SVG_HEIGHT + 120;

return (
<div className="is-hidden-touch">
Expand Down Expand Up @@ -170,7 +170,7 @@ const BubbleChart = ({ levels, sectors }) => {
x1="1"
y1="0.984375"
x2="1"
y2="1050"
y2={GRID_HEIGHT}
stroke="#D8D8D8"
strokeLinecap="round"
strokeLinejoin="round"
Expand Down
2 changes: 1 addition & 1 deletion app/views/tpi/companies/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<% if @company.cp_alignment_region.present? %>
<section class="container change-view">
<div class="buttons has-addons" style="justify-content: flex-end;">
<div class="buttons has-addons">
<%= link_to "Global benchmarks", {view: nil}, class: "button #{!regional_view ? 'is-primary' : 'is-secondary'}" %>
<%= link_to "Regional benchmarks", {view: 'regional'}, class: "button #{regional_view ? 'is-primary' : 'is-secondary'}" %>
</div>
Expand Down
Loading