From 341a8dd89cf856c1d5c8fefd732af14391f3a63d Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 20 Jun 2024 13:55:04 -0700 Subject: [PATCH] Disallow text wrapping in the "Total" cell in Item Getting Guide The table layout algo can get a bit funky about how it assigns extra space, I want to encourage things like "Total: 5 items" etc not to wrap, esp in the Dyeworks case where it's quite long! --- app/assets/stylesheets/items/sources.sass | 3 +++ app/views/items/sources.html.haml | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/items/sources.sass b/app/assets/stylesheets/items/sources.sass index 9f639d0b..d348ebe7 100644 --- a/app/assets/stylesheets/items/sources.sass +++ b/app/assets/stylesheets/items/sources.sass @@ -56,6 +56,9 @@ th text-align: left + .name-cell + text-wrap: nowrap + .thumbnail-cell img outline: 1px solid $soft-border-color diff --git a/app/views/items/sources.html.haml b/app/views/items/sources.html.haml index 018eb516..fb3db7c3 100644 --- a/app/views/items/sources.html.haml +++ b/app/views/items/sources.html.haml @@ -15,7 +15,7 @@ %thead %tr %td - %th + %th.name-cell Total: #{nc_total_for @items_needed[:nc_mall]} NC (#{pluralize @items_needed[:nc_mall].size, "item"}) @@ -52,7 +52,7 @@ %td.thumbnail-cell = image_tag "https://images.neopets.com/items/mall_80x80_cleaning.gif", alt: "Dyeworks Hue Brew Potion" - %th + %th.name-cell Total: #{dyeworks_nc_total_for @items_needed[:dyeworks]} NC + %span.price-breakdown{ @@ -124,7 +124,7 @@ %thead %tr %td - %th{colspan: 2} + %th.name-cell{colspan: 2} Total: #{pluralize @items_needed[:np].size, "item"} %tbody - @items[:np].each do |item| @@ -206,7 +206,7 @@ %table.item-list %thead %td - %th{colspan: 2} + %th.name-cell{colspan: 2} Total: #{pluralize @items_needed[:other_nc].size, "item"} %tbody - @items[:other_nc].each do |item|