Skip to content

Conversation

@Bargraph6
Copy link
Contributor

@Bargraph6 Bargraph6 commented Nov 12, 2025

What are the relevant GitHub issues?

closes: #4956
related to: #575

What does this pull request do?

There were a couple of images that did not have the correct "large" variant uploaded to the CDN.

This is the same issue described in #575 for the large variants of the "profit", "government", and "property" sections.

Unlike that change though, these panels also require a small css patch to remove the grey bars.

This is the variant used in the CSS rule:1

@media (min-width: 1201px) and (max-width: 1670px) {...}

The updated images that need to be added to the cdn are attached to this PR:

government-large.jpg property-large.jpg profit-large.jpg reconciling-large.jpg
government-large property-large profit-large reconciling-large

How should this be manually tested?

To test locally:

  1. observe the grey bars by setting the screen dimensions to 1280x800
    (DPR 1) in the browser dev tools

  2. put the fixed image in the website/public/tce/images/ directory.

  3. apply this patch to load have the local image loaded 0001-TCE-patch-for-testing-css-for-large-display-sizes.patch

    diff --git a/app/helpers/to_change_everything_helper.rb b/app/helpers/to_change_everything_helper.rb
    index a76f4d309..ebc401e82 100644
    --- a/app/helpers/to_change_everything_helper.rb
    +++ b/app/helpers/to_change_everything_helper.rb
    @@ -82,7 +82,18 @@ module ToChangeEverythingHelper
       end
    
       def url_for_tce_image *pieces
    -    [IMAGE_BASE_URL, pieces].join
    +    url = [IMAGE_BASE_URL, pieces].join
    +    if url.include? "reconciling-large"
    +      '/tce/images/reconciling-large.jpg'
    +    elsif url.include? "government-large"
    +      '/tce/images/government-large.jpg'
    +    elsif url.include? "property-large"
    +      '/tce/images/property-large.jpg'
    +    elsif url.include? "profit-large"
    +      '/tce/images/profit-large.jpg'
    +    else
    +      url
    +    end
       end
    
       def tce_image_tag filename
  4. reload the page and see the grey bars disappear

Is there any background context you want to provide for reviewers?

before/after screenshots

before after
government government before government after
property property before property after
profit n/a2 profit after
reconciling before after

Acceptance Criteria

These should be checked by the reviewers

  • This pull request does not cause the database export script to become out of sync with the db schema

Footnotes

  1. There are a few web versions (e.g. czech, polish) that do not
    use the templatized version of the TCE, so they are unaffected by this
    change

  2. Profit does not have a grey bar initially, however changing the size of the image and the css of the government panel would cause a grey bar if the css for this panel was not also adjusted

There were a couple of images that did not have the correct "large"
variant uploaded to the CDN.

This is the variant used in the CSS rule[^1]

```css
@media (min-width: 1201px) and (max-width: 1670px) {...}
```

The images will be uploaded as attachments to the PR

Local testing
-------------------

To test locally:

1. observe the grey bars by setting the screen dimensions to 1280x800
   (DPR 1) in the browser dev tools
2. put the fixed image in the `website/public/tce/images/` directory.
3. apply this patch to load have the local image loaded
   ```diff
   ```
4. reload the page and see the grey bars disappear

---

closes: crimethinc#4956
related to: crimethinc#575

[^1]: There are a few web versions (e.g. czech, polish) that do not
      use the templatized version of the TCE, so they are unaffected by this
      change
@Bargraph6
Copy link
Contributor Author

Bargraph6 commented Nov 12, 2025

@just1602 @veganstraightedge this is the same issue as the reconciling image I mentioned in #4956, however these panels require a minor css tweak in addition to the new images

Copy link
Collaborator

@runongirlrunon runongirlrunon left a comment

Choose a reason for hiding this comment

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

LGTM

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.

[TCE] fix reconciling-large image

2 participants