* Basics might be working?
* Stop propagating button clicks in autocomplete pills
* Better blank slate
* Better location to stop propagation
* Remove author_id from org co-authors
* Move UserStore and try testing it
* Remove extraneous comments
* OH... that's what that does!
* Very basic testing
* Re-organize javascripts
* Rename & re-org for testing
* Cleanup
* More tests
* Remove unnecessary nesting
* Coninuing to try to bump coverage
* Include /packs/ in code coverage metric
* Try tweaking jest coverage more?
We probably can't collect coverage from all of packs/* (because coverage is too low) but maybe we can try to opt-in for newer areas as we go?
* Relocate JS tests, for build & coverage
* User ID exception on search, not fetch
* Remove commented-out console.log
---------
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* feat: update the buttons
* chore: update the buttons to use c-btn
* feat: update the following tag to be crayons-btn crayons-btn--outlined
* feat: update the gap between the buttons
* feat: style for moile
* Empty commit
* feat: remove updated weights
* feat: click on following on the following tags page
* feat: add and listen for the following button click
* fix: dropdowns
* feat: handle hide button click
* feat: update the nav link for following tags
* feat: handel the 'unhide button' on the hidden tags page
* feat: add the styling for the buttons
* feat: add localization
* feat: remove the brand from the card
* feat: add some styling to the page
* feat: init scrolling
* chore: update the name of the file
* feat: abstract out the comment fetch code
* fix: close the attribute
* feta: make some adjustments to where the tag adn the follow show up
* rename class from plural to singular
* feat: updae the comment
* feat: add a mutation observer to initialize the dropdown
* test: follow_craete
* chore: remove irrelevant test
* feat: update the cypress seeds
* feat: update the cypress seeds
* spec: write soem initial tests for the following tags page
* spec: update the unfollow cypress spec
* spec: update the hide cypress spec
* spec: update the posts published spec
* note to add test for pagination
* spec: hidden tags page
* feat: remove aria pressed attributes
* fix: ordering by explicit points gets the page params confused and returns the incorrect and not all results on pagination
* fix: use explicit points
* feat: remove the message at the top of the following and hidden tags page
* chore: remove comment and rather add it to the PR itself
* refactor: do all the actions on success
* feat: refactor the dashboard tag file
* refactor: only show the tagId and followId dataset attributes on the dashboard__tag__container
* feat: disconnect the observer
* chore: add some documentation
* feat: add fr localization
* chore: empty line
* fix: update the dashboardTags page to first declare the observer"
"
"
* fix: update the rails test
* Empty commit
* fix: because I added more tags, the dropdown was longre and covering the body of the editor hence it could not find the text, so I've escaped after selecting my tags
* Initial basic work
* Bulk of related work, including find/replace on the inputs
* Adjust some tests
* Adjust some specs
* Fix a few more tests
* Clean up tests
* Adjust tests
* Test fiddle
* Adjust crop back to be a param
* Update tests
* Set proper defaults
* Fix some styling
* Adjust enrichment logic and tests
* Adjust form JS
* Update test snapshot
* Clean up formatting
* Fix spec name
* Adjust some css and defaults
* Adjust translation for image provider options
* Switch from fill to fill-down
* Proper fallback image
* Fix tests
* Update app/services/images/optimizer.rb
Co-authored-by: Mac Siri <mac@forem.com>
---------
Co-authored-by: Mac Siri <mac@forem.com>
* feat: add a hidden tags route + controller + view
* refactor: make a re-useable template for hidden_tags and following_tags
* chore: add some jsdocs to document/help follow the code
* chore: add some jsdocs to document/help follow the code
* feat: add soem comment changes
* refactor: use more readable string concatenation
* refactor: use more readable string concatenation
* fix: whoops error in template literal
* feat: potential solution to being able to query the paginated hidden tags whilst using the existing following_tags functionality
* feat: typo
* chore: add comment
* update the count for the dashboard sidebar
* feat: add the correct count on the mobile action menu
* spec: update the request spec to ensure that we have the correct tags being displayed
* refactor: query for hidden tags
* chore: update initscrolling language in comments
* refactor: prioritize readability
* refactor: update where clause
* chore: add more clarifying comments
* feat: make sure that we only rename if action exists in initScrolling
* feat: update the styling for the update weights section
* feat: include followable on tag page
* feat: update points to explicit_points in the followings_controller
* feat: abstract out the uncommon UI elements and move them to the top level template
* feat: remove unused html
* chore: remove the antispam tag
* feat: update the tags template and corresponding localization keys
* chore: update the comment
* feat: update the following_tags spec
* spec: update accordingly
* refactor: use URLSearchParams
* feat: update the follow and antifollow/hidden tags
* feat: use a range
* fix: use explicit points
* Empty commit
* feat: update the pagination styles
* update localization
* Article query spec for scheduled articles
* Added scheduled article badge on the user dashboard
* Added published_at field to editor options
* Accept and validate published_at from editor
* Refactor published_at validation
* Allow 1-minute difference in published_at
* Notice on an unpublished article page
* Added specs for 'Click to edit' link on scheduled article preview page
* ContextNotification model
* Articles::Publish worker
* Added specs for articles publish worker
* Schedule publish articles worker
* Added tests to check for scheduled posts in feeds
* Don't allow managing scheduled articles
* Don't send notifications for scheduled articles
* Set published_at in Articles::Updater when publishing
* Published_at value in post options
* Pass timezone and set published_at accordingly
* Limit setting published_at to the future
* Readonly published_at for articles that were already published
* Chagning published_at format in editor v1 (start)
* Changed published_at format in frontmatter, specs
* Added specs for updating published_at from frontmatter
* Fixed accepting past published_at for articles published_from_feed
* Enabled published_at validation: don't allow updating published_at for already published articles
* Validate published_at on create
* Added a spec for updating published_at for exported articles
* Fixed specs related to creating articles with past published_at
* Fixed specs related to past published_at for articles
* Added a hack so that admins would be able to update published_at
* Switch button text schedule/publish when changin publishedAt
* Fixed saving published_at with timezone
* Added a feature flag for scheduling articles
* Default text in markdown editor depends on feature flag
* Enable article editor cache again
* Fixed the default value in the markdown editor
* Fix sitemaps spec
* Removed tooltip
* Fixed articles update specs
* Added missing locales
* Fixed article create specs
* Fixed spec
* Removed commented code
* Returned enabling extensions in the schema
* Returned accidentally deleted constraint
* Make articles query spec more stable
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
* Removed commented code
* Removed unused code
* A clearer policy
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
* Use StringInquirer for article current state
* Added a note and todo to articles factory past trait
* Remove duplicated PropType
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Refactor query in the Articles::PublishWorker
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Refactor articleForm.jsx
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Removed specs that are no longer relevant
* Removed useless onKeyUp on a hidden input
* Refactored articleForm
* Hide scheduling from post options when published_at is readonly
* Run sends notifications worker every 5 minutes instead of every minute
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Adding logic to hide Create Post on empty dashboard
As implemented, folks won't see this page if they can't create a post.
However, as our implementation drifts, we should continue to apply the
same policy.
See forem/forem#16999 for the conditional logic that redirects users.
* Adding a hack to fix a unit test
This commit provides two things:
1. Some notes related to my analysis regarding the dashboard
2. Conditional redirects and rendering based on article policies
The code comments say most of what I want to say, but to reiterate:
When a user can't create articles nor do they already have published
articles, then we don't want to avoid showing them stats related to
articles.
Closesforem/forem#16913
Related to forem/forem#16908 and forem/forem#16931
This commit compresses the policy check that spanned both :new? and
:enabled?. We hide the ability to upload a video (as per the altered
html.erb files of this commit) but we didn't enforce the same logic in
the controller.
Further, as Videos are a subset of Article, I'm adding the "verify the
user is not suspended" test.
Directly relates to #16483
For sleuthing this relates:
- #16728
- forem/forem#16537
- #16634
And for historical context, this relates to:
- #10955
- #10954
- forem/internalEngineering#149
* Refactoring to add helper method
Prior to this commit, we made view level calls to service modules. This
refactor provides convenience methods on the model.
Furthermore, it addresses a few Rubocop violations that "come along for
the ride."
* Ensuring cached entity squaks like User
* Fixing broken spec
* Fixing typo
* Make dashboard left side nav an ul with the anchors as li items
* Add correct class to new ul element so that nothing changes visually
Suggested by @aitchiss and tested by @msarit, I thought some css styling may need to be applied, thanks!
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* fix analytic page have no back-to-dashboard button when user have no organization
* resolve conflict with main
* remove dump
* add test for back to dashboard button
* change dashboard landmark nesting
* switch to main db/schema.rb
* remove unnecessary div
* revert scema.rb to main
* fix user_visits_dashboard test
* change aside to nav, put nav back into main-content
* remove unnecessary file
* remove duplicate nav
* add id to main
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Create DiscussionLocks
* Fix specs
* Update nullify_blank_notes_and_reason
* Update before_validation call
* Updated DiscussionLockPolicy for clarity
* Move permitted_attributes to a constant
* Update route
* Apply suggestions from code review for frontend
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Add title tags
* Wrap unlock confirm in main element
* Wrap flash messages up in div
* Actually fix title tags
* Hide comment reply button when discussion is locked
* Add E2E tests
* Try to fix E2E tests
* Cypress...you work locally but not in CI...why!?
* PR feedback
* Update E2E tests
* More E2E updates 😭
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* use dropdownutils in dashboard and manage pages
* add tests for the toggle menu on dashboard
* add test for archiving from manage post view
* small tweak to avoid unhandled errors
* small tweaks to form methods
* Rename SiteConfig
* More renaming
* Update spec
* Update mandatory settings mapping
* More renaming
* e2e test fixes
* You have a rename, and you have a rename
* Spec fix
* More changes
* Temporarily disable specs
* After-merge update
* Undo rename for migration
* undo rename of DUS
* Fix DUS
* Fix merge problem
* Remove redundant DUS
* Fix specs
* Remove unused code
* Change wrong class name
* More cleanup
* Re-add missing values to constant
* Fix constant
* Fix spec
* Remove obsolete fields
* Add accidentally removed field
* Update spec
* Move methods from Settings::General to ForemInstance
* Remove unneeded model
* Change mentions of 'site config'
* Sanitize tag URLs
For tags with non-ASCII names, we were generating busted URLs, which
would then cause errors. This commit fixes that particular error by
generating usable URLs.
* Use URL generator that will sanitize tag names
* Remove path prefix when using a URL generator
* fix following tags input a11y errors
* give hidden inputs unique ids
* update html element code in initScrolling, update test with new ids
* refactor
* trigger travis
* target the textfield inside the div in the test
* Small UI refactor that makes the stats page resonsive (to some degree)
* Add import to scss file
* Whoops
* Implement feedback from review
* Extract flex value into variable
* Update app/javascript/analytics/dashboard.js
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Remove pro role on user, expose pro dashboard to all users as analytics
* Remove pro from Elasticsearch mappings
* Update user role docs to use :trusted over :pro
* Remove pro from Role model spec
* Remove more references to pro, as noted by @rhymes