* disable authors and co-authors selectors for series posts
* add translations
* fix constrant issues
* add alternative text for icon
---------
Co-authored-by: Mac Siri <mac@forem.com>
* 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>
* 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>
* 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
* 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>
* 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'
* wip init handle draft class and styling
* add draft button
* start splitting up listing row into multile files
* separate tag links
* split location
* fix location
* separate listing row action buttons
* update listing row proptypes to describe listing object
* contact via connect to jsx
* fix default checked
* init draft creation and first publish charge
* fix first publish logic and credit charging
* handle drafts in dashboard filtering
* adjust isDraft bool statement
* hide drafts from main listings feed
* fix expired and draft bools in listing row
* adjust create listing org credits
* internally handle drafts
* adjust listing row
* break down update method
* remove unnecessary logic and shorten lines
* fix logic again woops
* convert input hidden value + submit into one form button submit with corresponding name and value
also adds clear message that drafts do not cost credits
* handle insufficient org credits on first publish
- uses user credits to publish
- similar to bump implementation
* fix sorting for personal and all orgs
* space out some elements
* don't spend original users credit for them
* add delete buttons and delete_confirm and destroy methods
* remove notification removal since listings dont trigger notifications
* move draft message and add draft_params to tests
* Update classified_listings_controller.rb
* update tests
* update snapshot
* add del tests
* add guard preventing free draft publish
* fix draft filter
* update from master and resolve merge conflict in listing preact
* Revert "update from master and resolve merge conflict in listing preact"
This reverts commit 0a34fccf334a2ca0902644b486cb26ead6bef664.
* update column spec
instead of setting and saving
* separate two expectations into their own tests
* split more tests into single expectations
* change to unless bumped_at? instead of if nil
* Fix listing draft edge cases and styling
* Add title tags to listings pages
* Allow user to have many orgs
* Allow users to handle multi orgs in settings
* Make rounded buttons inline
* Add multi org function to dashboards
* Fix merge conflicts
* Fix mistake in merge conflict fix oops
* Display the correct membership level
* Fix accessibility issues
* Display organizations for article editors
* Handle submitting org id with preact editors
* Make listings work with multiple organizations
* Allow listings to have multiple orgs on create
* Display the correct number of credits for each org
* Move script tag to Webpack
* Allow multi orgs for purchasing and viewing credits
* Use OrganizationMembership as authorization check
* Display multiple organizations for notifications
* Allow dashboard to be viewable under multi-orgs
* Remove unused method
* Add multi-org functionality for article editors
* Show pro dashboard buttons for member+ org levels
* Leave the correct organization
* Allow article API to change org id
* Add left-out authorization method oops
* Make nav buttons a bit more clear
* Fix merge conflict
* Fix adding org id for /api/articles and tests
* Fix tests for org policy
* Use proper logic for displaying org members
* Update org actions with new authorization
* Use correct org when creating a listing
* Remove additional payment charge oops
* Mark org notifications as read with authorization
* Remove deprecated post_as_organization attribute
* Use new org_admin syntax
* Remove deprecated org logic for article create and update
* Default all RSS posts to not belong to any org
* Render org_member page for guest users
* Update org policy spec to work with multi orgs
* Use org_membership for org traits and move identity code
* Use org_member trait
* Update to work with multi-orgs
* Validate article's org_id if param org_id is blank
* Make a let variable
* Remove unnecessary eager load for credits
* Fix HTML structure and org logic for non-org users
* Update credits spec for multi-org
* Add test for failed payment when purchased by org
* Lint listings_spec
* Test that the listing was created under the user
* Add tests for POST /listings multi-org
* Use double quotes for classes
* Fix /manage and a few other multi-org bugs
* Fix test for multi org
* Use correct method SQL exists? not Rails exist?
* Fix reads spec for multi-org
* Fix org_controller actions to work with multi org
* Test only multi org and not old usage and fix leave_org
* Fix org showing user profile img test for multi-org
* Fix org logic for users with no orgs
* Remove switch org functionality
* Update tests and add hidden param for org id
* Redirect to the specific organization
* Test other org button actions
* Use settings_notice instead of legacy notice and refactor
* Fix weird extra end issue prob from merge conflicts
* Test for with new flash key
* Fix user_views_org tests for multi-org
* Test for new flash message
* Update snapshot with new a11y html
* Move styling to stylesheet
* Add site admins functionality
* Move org_member? method in user model and refactor
* Use unspent_credits_count for organizations
* Add tests for /listings/new and minor bug fixes
* Use .present? in case of empty array
* Fix a lingering deprecated method
* Use greater than 1 for random numbers
* Add tests for counting spent and unspent credits
* Preload organization, not user
* Preload users only when needed
* Pre-load podcasts for podcast episodes in API
* Avoid eager loading error by loading rating votes separately
* Preload associations for moderation
* Preload user comments in trees
* Preload organization for non org dashboard and cleanup queries
* Optimize ArticleSuggester to only load N articles at need
* Remove eager loading and pass variables to partials for easier debug
* Reorganize tags validation code and ignore actsastaggableon eager loading issues
* Remove unused eager loading and bring up comments relation
* Preload podcasts when loading podcast episodes
* Fix views specs
* Make sure ArticleSuggester never returns duplicates
* Remove commented code
* Re-trigger build
* Move suggested articles back to view to respect fragment caching
* This commit adds the "archived" attribute to the Article model, which will
enable users to automatically filter archived articles/drafts from appearing
on their dashboard. It also adds an ellipsis menu with a link to archive the
article. I've also moved the Mute Notifications button into the ellipsis menu
as well.
* Add ellipsis menu and make it work
* Fix logic error
* Hide ellipsis menus when you click elsewhere on the body
* Extract function to remove duplication
* Ensure that menu is hidden when the ellipsis button is clicked on an open menu
* Ensure that archiving post button works and that 'archived' param is accepted by the controller
* Enable link to toggle showing/hiding archived articles
* Make 'mute' and 'archive' buttons in ellipsis dropdown list work
* Refactor to make Code Climate happy
* Minor JS refactors
* Set up basic /manage route
* Add basic article manage page
* Add tips and finalize permissions for /manage
* Add final test and add manage button to article show
* Update failing specs
* Removed clear fix div
* Removed floating properties
* Added Flexbox properties to parent container
* Added media queries for screens smaller than 426px and adjusting styles accordingly
* Stretched and centered `upload a video` & `sort` select. Tested on Chrome and Firefox.
* Adjust `sort` select box's font-family according to other elements.
* be able to sort dashboard articles (#1837)
* remember to escape order clause is arel (#1837)
* add back in missing character for created_at (#1837)
* use case statement to avoid threat of injection (#1837)
* write specs to ensure sorting works for dashboard articles (#1837)
* add publish sort options, refactor sort options into articles helper (#1837)
* refactor to use model scope (#1837)
* Remove harsh video restriction and add video duration
* Fix video meta data and tests
* Modify video tests
* Rescue video duration fetch error
* Change log to puts in test