Commit Graph

2408 Commits

Author SHA1 Message Date
William Karsten 8f363dc411 Removes jQuery from the ctrl enter function to submit comments, also fixes issue #1082 2022-06-03 11:45:40 -05:00
William Karsten d497302431 Convert the story upvoter to remove jQuery 2022-06-03 11:38:14 -05:00
William Karsten 90f8f0b692 Convert the flagStory click action to remove jQuery 2022-06-02 13:55:31 -05:00
William Karsten e1bb0ff756 Convert the comment upvoter to remove jQuery 2022-06-02 12:20:11 -05:00
William Karsten 957045ba1a Retarget the postComment function to the form for a submit instead of an on click 2022-06-02 11:49:08 -05:00
William Karsten 905ff4ac61 Convert the comment post button to remove jQuery 2022-06-02 10:41:16 -05:00
William Karsten 1b60bf64ab Convert the comment flag button to remove jQuery 2022-06-02 10:41:16 -05:00
William Karsten 9eaeaf1381 Convert the story preview button to remove jQuery 2022-06-02 10:41:16 -05:00
William Karsten 081c109b3d Convert the comment preview button to remove jQuery 2022-06-02 10:41:16 -05:00
William Karsten 112f774ffe Recreate the markdown helper toggle without jQuery 2022-06-02 10:41:16 -05:00
Peter Bhat Harkins 10d2557afd refactor novelty logo bgs to method
Previously I've manually applied Christmas styling on Christmas by hacking the
prod CSS, nice to bring that into the codebase properly.
2022-06-01 22:19:58 -05:00
Peter Bhat Harkins 047a017474 Merge branch 'microkernel2018-master' 2022-06-01 21:37:01 -05:00
rain1 477d46d36e Make the L have a rainbow background on June
looks like this https://postimg.cc/hXwW9FqJ
2022-06-01 21:36:39 -05:00
Eric Banisadr 9a6ea40b06
Remove duplicate "blankness" comment validation, tidy (#985) 2022-06-02 02:31:36 +00:00
Peter Bhat Harkins 2c99c2beac revert dead code from 7d0135, #464
The original code never set an edit_comment css class and the codebase has
never otherwise used one, so the 'if' always evaluated false. I confirmed this
fix worked because of the new show_tree_line param.
2022-06-01 17:25:59 -05:00
Peter Bhat Harkins 7e16d8f98d DB is UTC - fix #1073 2022-06-01 07:56:52 -05:00
Jason Maa 604d00f8c1
Fix #1087: Add unban reason to fake data (#1089) 2022-06-01 11:13:02 +00:00
Peter Bhat Harkins 60e86da8cd bump for potential vulnerability 2022-06-01 06:04:06 -05:00
Peter Bhat Harkins fb9e436004 bump for CVE-2022-30122 and CVE-2022-30123 2022-06-01 06:02:48 -05:00
Peter Bhat Harkins 344e947374 Fix fake_data task; add CI test for it (#1087)
The test is overdue for how brittle fake_data.rb is, but as that's a slow
process that's not critical functionality, I only want it running on CI.
2022-06-01 05:57:18 -05:00
William Karsten 36cee94b69
Fix the fake data bugs & add progress bar (#1086) 2022-05-26 01:17:29 +00:00
Peter Bhat Harkins a475d9b593 tests, frontend for previous 2022-05-25 09:31:16 -05:00
Peter Bhat Harkins b822c2cdc2 why does this not take a reason 2022-05-25 09:12:08 -05:00
Peter Bhat Harkins 4e96034253 Revert "only load select2 on story submit form"
This reverts commit 71045a52ee.

This only has a small effect on js size and is flaky. Need a significantly
bigger change, like dropping jquery altogether.
2022-05-20 09:17:46 -05:00
Peter Bhat Harkins 4be8ba1154 Merge branch 'threeplanetssoftware-feature-917-category-editing' 2022-05-19 00:52:49 -05:00
Peter Bhat Harkins 905526c815 run migration to match prod output 2022-05-19 00:52:27 -05:00
Peter Bhat Harkins 78deac1312
Merge branch 'master' into feature-917-category-editing 2022-05-19 05:39:33 +00:00
Peter Bhat Harkins aed68f34b5 bump to Rails 6.1.6 for cve 2022-05-18 21:11:36 -05:00
Three Planets Software 5113d0bb11
Update fake_data script to help troubleshoot flags. (#924)
* Update fake_data to create test Categories and pass those in to
new tags when created. Does not use find_and_create_by! for new
Tags since that could attempt to create another tag with the same
name if the random Category is different.

Update fake_data to use the newer Faker::Lorem syntax, specifying
the parameter name in .sentences() and .paragraphs().

* Update fake_data script to help troubleshoot flags.
Create users that are admins, as well as moderators.
Flag comments and stories from random users.
Add user karma and invite heirarchy.

* Add more realistic data, such as stories with links and text,
saved stories, user moderation, and hat moderation.

Signed-off-by: Three Planets Software <threeplanetssoftware@users.noreply.github.com>

* Add moderation of stories (merging and deleting) to fake data.

* Add story title edits to moderation fake data.

* Update fake_data to store comments and stories in Arrays, instead of
calling the database. Set default values for the generator method.

* fix merge conflicts

* rubocop

Co-authored-by: Peter Bhat Harkins <pushcx@users.noreply.github.com>
2022-05-18 14:53:29 +00:00
Peter Bhat Harkins 71045a52ee only load select2 on story submit form
Saves me seeing a distracting 'event' on every element on the page. The latest
version of select2 (2021-01-23) is entirely rewritten so I don't want the risk
of an update.
2022-05-11 09:06:18 -05:00
Calvin Buckley 7dc5520c23
include parent comment short_id in comment json (#974) 2022-05-11 13:33:24 +00:00
Calvin Buckley 00d29daeb7
Plain text of comments and stories in json (#975) 2022-05-11 13:09:03 +00:00
Peter Bhat Harkins a92e9988bd missed using Story.base here 2022-05-06 08:38:40 -05:00
Peter Bhat Harkins b7c1c16304 one more link to IRC, rm obsolete CSS info 2022-05-05 07:47:57 -05:00
Peter Bhat Harkins b49b5c54d8 fix routing for domain rss feeds 2022-04-22 08:39:29 -05:00
vincentrolfs b90a2cb3c8
Make system messages deleteable (Fix #1049) 2022-04-20 13:09:37 +00:00
Peter Bhat Harkins 7aabc57289 rubocop 2022-04-19 17:54:22 -05:00
Peter Bhat Harkins 413e9c0f0b convenience for prod console 2022-04-19 17:47:58 -05:00
dependabot[bot] 091e49eab6 Bump nokogiri from 1.13.3 to 1.13.4
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.3 to 1.13.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.3...v1.13.4)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-19 22:47:26 +00:00
dependabot[bot] 70e187bd72 Bump puma from 5.6.2 to 5.6.4
Bumps [puma](https://github.com/puma/puma) from 5.6.2 to 5.6.4.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.6.2...v5.6.4)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-06 02:35:45 +00:00
Jeppe Fihl-Pearson 8e1493c36e Use MariaDB instead of MySQL when running tests in GitHub Actions
This starts a Docker container running MariaDB instead of using the MySQL
database that GitHub Actions comes with. This means we can configure which
specific version of MariaDB to run.

I opted for MariaDB 10.5 as that was my best guess as to what version was
running in the deployed setup, based on it being the version available for the
"mariadb-server" package in Debian stable.

The Docker container is configured to create the "lobsters_dev" database
automatically, so it shouldn't be necessary to run a command to explicitly
create the database anymore.

Fixes #1050.
2022-04-03 17:32:14 +00:00
Diep Pham b54d351021 fake_data try to add comments to deleted stories
Following error happens when running fake_data task:

> ActiveRecord::RecordInvalid: Validation failed: Story is no longer accepting comments.

The fix is do not create deleted stories with is_deleted: true
immediately, but delete them after adding comments.
2022-03-30 13:08:26 +00:00
Brian Kung 63ab9a464f Fixes comment flag bug, closes #1062 2022-03-30 13:07:16 +00:00
Peter Bhat Harkins e49e1672d7 bump deps for cve, rubocop 2022-03-23 09:35:50 -05:00
Peter Bhat Harkins d08117b3e5 tests for 57cf2989 fixing #1070 2022-03-23 07:29:31 -05:00
Peter Bhat Harkins 57cf2989ba Fix #1070 - tag rss feeds 2022-03-21 20:58:25 -05:00
Peter Bhat Harkins c7427c291e linebreak for rubocop 2022-03-19 17:11:04 -05:00
Peter Bhat Harkins ef642dff69 fix Keystore.value_for; add some guardrails to mail_new_activity
Really embarassing bug in e334ae. This returned the current traffic intensity
number for all queries (0-100) so this started sending the mailing list mode
users basically every story and comment from the dawn of time.
2022-03-19 17:02:07 -05:00
Peter Bhat Harkins e334ae41b4 perf improvements for traffic intensity
TrafficHelper's hot-path intensity does a single select for a single row and
loads the value rather than instantiate an ActiveRecord object.

Updating the intensity has moved entirely to the cron job to prevent dogpiling,
and does three upserts instead of select + upsert.

No more hassling around with different keys for intensity when we only use the
latest value.
2022-03-19 08:15:20 -05:00
Peter Bhat Harkins c98648933b don't show 0 mods 2022-03-18 18:54:13 -05:00