-
Notifications
You must be signed in to change notification settings - Fork 124
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
bug-fix: duplicating copy right year #1385
bug-fix: duplicating copy right year #1385
Conversation
add: "data: { turbo: "false" }" on adoptable pet link.
@Gabe-Torres I think the issue is going to come up anywhere the footer partial is used (which link you click and go back from shouldn't matter). We should leave turbo enabled. Can you take a look at the two partials where the copyright is.
Maybe something like this will do the trick: |
@jmilljr24 Maybe there's something I'm missing but is there a reason to prefer a script here? Couldn't we use |
That's definitely better! The script was already being used and I didn't look into it further. I can't think of a good reason to use the inline script. Thanks for pointing it out. |
Thank you @MooseCowBear. That does indeed fix the issue! 👍🏽 |
Remove script and update with <%= Time.now.year %> to get current year for copyright.
…Gabe-Torres/homeward-tails into 1367_copyright_year_duplication
add: "data: { turbo: "false" }" on adoptable pet link.
Remove script and update with <%= Time.now.year %> to get current year for copyright.
8583028
to
f58dd20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some leftover changes from your previous troubleshooting that we don't need.
@@ -37,7 +37,7 @@ | |||
<!--//? bootstrap cards --> | |||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 mt-4 w-100 justify-content-center"> | |||
<% @pets.each do |pet| %> | |||
<%= link_to adoptable_pet_path(pet) do %> | |||
<%= link_to adoptable_pet_path(pet), data: { turbo: "false" } do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<%= link_to adoptable_pet_path(pet), data: { turbo: "false" } do %> | |
<%= link_to adoptable_pet_path(pet) do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I took it out! Sorry about that. I’ve just removed it, and I believe everything is updated now. My commit history is a bit messy on this branch. For future reference, what is the best way to clean it up? I’d like to make sure that only the relevant commits are included in the push, with any unnecessary ones removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gabe-Torres for this repo we do a squash and merge into main so it really doesn't matter. You can take a look at the commit history for main and see what is actually in there. Other organizations may have a different policies on what commits that want to in the history.
From your end, look up interactive rebase if you really want to clean up your commits before opening a PR. After the PR is open I generally wouldn't changing your commit history.
…hub.com/Gabe-Torres/homeward-tails into 1367_copyright_year_duplication" This reverts commit 8583028, reversing changes made to 8e9278f.
…Gabe-Torres/homeward-tails into 1367_copyright_year_duplication
Remove script and update with <%= Time.now.year %> to get current year for copyright.
…Gabe-Torres/homeward-tails into 1367_copyright_year_duplication
author Cassie <58792902+cassieemb@users.noreply.github.com> 1740690506 -0600 committer Gabriel Torres <127896538+Gabe-Torres@users.noreply.github.com> 1741061319 -0600 add start and end date to foster card (rubyforgood#1381) bug-fix: duplicating copy right year Remove script and update with <%= Time.now.year %> to get current year for copyright. bug-fix: duplicating copy right year add: "data: { turbo: "false" }" on adoptable pet link. Revert "Merge branch '1367_copyright_year_duplication' of https://github.com/Gabe-Torres/homeward-tails into 1367_copyright_year_duplication" This reverts commit 8583028, reversing changes made to 8e9278f.
Bumps [kamal](https://github.com/basecamp/kamal) from 2.5.2 to 2.5.3. - [Release notes](https://github.com/basecamp/kamal/releases) - [Commits](basecamp/kamal@v2.5.2...v2.5.3) --- updated-dependencies: - dependency-name: kamal dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) * display upcoming fosters modify controller method to display upcoming and current fosters, add tests, modify card to show badge with the status of the foster * change name from h3 to h4 * stack badge under photo * increase name size and orient badge under name bug-fix: duplicating copy right year add: "data: { turbo: "false" }" on adoptable pet link.
…Gabe-Torres/homeward-tails into 1367_copyright_year_duplication
I'm going to close this branch and make a new one. I got into a bit of a Git mess and think it'll be better to start over for such a small change. 😨 EDIT - new pr that looks much cleaner - #1388 |
add: "data: { turbo: "false" }" on adoptable pet link.
🔗 Issue
(#1367)
✍️ Description
After looking into this bug, I found that Turbo caches previous pages for faster navigation/refreshes, which was causing the duplication problem I think. Adding data: { turbo: "false" } to the adoptable pet link in the organization home index view fixed this by forcing a full page refresh when navigating back.
If this is the approach we want to take, there may be other instances where this is needed. I’m also curious about the extent to which the application relies on Turbo. Could disabling Turbo in this way cause any unintended issues?
📷 Screenshots/Demos
https://jam.dev/c/09dca437-db81-46da-ab55-1fce93fb9bdd