Skip to content

AO3-7133 On Statistics page, "Flat View" button doesn't appear pressed when selected#5401

Closed
Cubostar wants to merge 16 commits intootwcode:masterfrom
Cubostar:AO3-7133-on-statistics-page-flat-view-button-doesnt-appear-pressed-when-selected
Closed

AO3-7133 On Statistics page, "Flat View" button doesn't appear pressed when selected#5401
Cubostar wants to merge 16 commits intootwcode:masterfrom
Cubostar:AO3-7133-on-statistics-page-flat-view-button-doesnt-appear-pressed-when-selected

Conversation

@Cubostar
Copy link
Copy Markdown
Contributor

@Cubostar Cubostar commented Oct 8, 2025

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-7133

Purpose

This PR fixes a bug in the Statistics page where when the "Flat View" button is selected, the "Flat View" button doesn't appear pressed after.

Testing Instructions

Currently, this bug is not reproducible on the development environment. I would like suggestions on how to test for this bug.

Credit

Cubostar, he/him

@anmazz
Copy link
Copy Markdown
Contributor

anmazz commented Oct 8, 2025

I was able to recreate the bug on local by switching the params around:
http://localhost:3000/users/testuser/stats?sort_column=hits&sort_direction=DESC&flat_view=true

anmazz and others added 15 commits October 14, 2025 16:01
* e-mail -> email

* Update user_mailer_spec.rb
…r editing a work (otwcode#5379)

* Use 'Save Draft' over 'Save As Draft'

* Show 'Save Draft' in New Work and New Chapter

* Show 'Update' appropriately for chapters, works, edit_tags

* Rearrange and standardize buttons

* Style

* Fix subtitle of preview tags

* From 'Update Tags Work' to 'Preview Work Tags'

* i18n

* Use link_to where applicable

* Update features part 1

* part 2

* part 3

* i18n page title

* part 4

* Tweaks

* Missed a button

* part 5

* Refine Cancel behavior

* Tidy page title  i18n

* Resolve AO3-6217

* Resolve AO3-4181

* AO3-7085 dog

* AO3-7085 dog 2

* AO3-7085 remove wrong spec code

* AO3-7085 normalize

* Review

* AO3-7085 Use partials for less redundant work/chapter actions

* Rename partials to posting_fieldset

* Reviews

* fix

---------

Co-authored-by: Sarken <sarken@gmail.com>
Bump rack from 2.2.18 to 2.2.20

Bumps [rack](https://github.com/rack/rack) from 2.2.18 to 2.2.20.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](rack/rack@v2.2.18...v2.2.20)

---
updated-dependencies:
- dependency-name: rack
  dependency-version: 2.2.20
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…twcode#5398)

* AO3-7154 Fix that custom note was overwritten when spambanning user

* AO3-7154 Reloading helps
* AO3-7108 Tests for Skin.default

* AO3-7108 Update Skin.default

* AO3-7108 Test tweaks
* AO3-5996 Write to Comment.spam on update

Updating a comment's spam status will now write to the spam column.
This is in addition to the approved column.

* AO3-5996 Update Comment model rspec

Update Comment model rspec to include tests for mark_as_spam! and
mark_as_ham! methods.

* AO3-5996 Update CommentController rspecs

Update the following CommentController rspecs to reflect the
spam column being updated when a comment is marked as spam/ham:
- comment_moderation_spec.rb
- default_rails_actions_spec.rb
- freeze_spec.rb

* AO3-5996 Add rake task to populate spam column

* AO3-5996 Add rspec for comment rake task

* AO3-5996 Move unit test outside a loop

The test at line 488 in comment_moderation_spec.rb does not need to
be in a loop. Moved it outside of the loop for test efficiency.

* AO3-5996 Set spam on Comment create

* AO3-5996 Add Comment.spam create specs

* AO3-5996 Resolve reviewdog issues

Resolve reviewdog linting issues with the
comment:sync_approved_to_spam rake task and its associated
rspec test.

* Streamline Comment model updates

Fix and streamline the Comment model updates:
-Make it easier to deprecate approved writes by refactoring
 changes to mark_as_spam! and mark_as_ham!
-Ensure the spamcheck is only called once in check_for_spam.

* Reorganize Comment model spec

Reorganizing, enhancing, and removing redundant code from
spec/model/comment_spec based on code review feedback.

* Fix sync_approved_to_spam rake task

Fix and reorganize the syn_approved_to_spam rake task based on
code review feedback:
-Remove limit arg
-Run task over entire collection. This will prevent the rake task
 from killing the db
-Move task to the After tasks file
-Update specs accordingly

* Revert comment_spec organization

This PR initially reorganized some tests in the Comment model spec.
This commit undoes some of that reorganization so the spec better
aligns with master.

* Rm stray newline in Comment model spec

* Refactor specs so callbacks run in test setup

Update default_rails_actions_spec and freeze_spec to use
update_attribute instead of update_columns to ensure that callbacks
run correctly during test setup.

* Optimize comment_spec

Optimize comment_spec per code review feedback by:
-Removing an unneeded let statement
-Using true/false instead of 1/0 for clarity and consistency
…der field (otwcode#5335)

* using url_format and checking for validation in test

* added specific message
otwcode#5324)

* AO3-7096 Track when a collection's anonymous/unrevealed settings were updated

* AO3-7096 Default timestamps to nil
* AO3-6644 Adding jpeg support for collection header

* AO3-6644 Add i18n and tests

* AO3-6644 Use valid instead of save in tests

---------

Co-authored-by: Jonathan Snyder <morg223@protonmail.com>
* Do not make edit button a link

* fixing?

* approach

* Remove and comment on post route
@github-actions github-actions bot added Has Migrations Contains migrations and therefore needs special attention when deploying Gem Updates labels Oct 14, 2025
@Cubostar Cubostar closed this Nov 17, 2025
@Cubostar Cubostar deleted the AO3-7133-on-statistics-page-flat-view-button-doesnt-appear-pressed-when-selected branch November 17, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting Review Gem Updates Has Migrations Contains migrations and therefore needs special attention when deploying

Projects

None yet

Development

Successfully merging this pull request may close these issues.