Commit graph

245 commits

Author SHA1 Message Date
Dmitro Pochapsky
d0f615f3af Fix chat.jsx lints (#3889) 2019-09-12 09:30:59 -04:00
rhymes
61494d2343 Images uploads: fix UI for multiple images (#3958)
* Fix spacing of images button in editor v1

* Fix wording for multiple images in editor

* Update JS tests
2019-09-07 10:57:14 -04:00
Akshay Mahajan
c5577f68a3 Reading list: set default reading time to 1 minute (#3927)
* fixes 0 min reading time in reading list by setting the default reading time to 1 min

* Updated PropTypes for article_reading_time & reading_time to number.isRequired. Updated the relevant tests.
2019-09-03 15:50:40 -04:00
Mario See
fda048dc12 Listing Drafts and Deletion (#3540)
* 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
2019-09-01 13:54:54 -04:00
Mario See
3cf6a2d4bc Add singleListing specs (#3883) [ci skip] 2019-08-30 14:49:20 -04:00
Ben Halpern
9259a70ab8
Modify onboarding slides (#3864) 2019-08-28 11:05:57 -04:00
Mario See
47c2885810 Listings set custom expiry date (#3770)
* add expire_on column to classified_listings

* add expire_on to valid listing params

* add expire_on to model

* add expire date to new listing form

* add field in edit form

* add expiry dates to dashboard

* update expiry date in listing toolkit

* WIP unpublish job and test

test still has to run properly

* add job to class name

* change job to rake task

* revert snap change

* delete migration file

will add new one and revert schema changes to rename column

* reset schema

* add new migration to schema 'expires_at'

* change expire_on to expires_at
2019-08-23 17:33:50 -04:00
Ben Halpern
76bedc6b23
Add onboarding variants and update variant display ratio (#3812) 2019-08-23 12:48:29 -04:00
Ben Halpern
40559a0457
Add random variants to onboarding for a/b testing (#3742)
* Add random variants to onboarding for a/b testing

* revert listings dashboard snapshot
2019-08-18 18:30:22 -04:00
Bolarinwa Balogun
41aff162cc Allow upload of multiple images at a time (#3599)
* Allow upload of multiple images at a time

* Update schema.rb
2019-08-18 15:03:14 -04:00
Theau Poulat
e0a7c7cc6e Onboarding : fixed bug that prevented toggle by clicking on label (#3725)
* toggle click bug fixed

* updated snapshot
2019-08-16 11:41:00 -04:00
Jacob Eubanks
180935bd37 Delete unused, commented-out code (#3722) 2019-08-15 12:24:48 -04:00
Andy Zhao
0f46b0deed Add Stack Exchange Liquid tag (#3637)
* Add Stack Exchange Liquid tag

* Add Stack Exchange/Overflow tag

* Convert to integers

* Add better error handling

* Make all links open in new tab

* Adjust names and refactor a bit

* Use key for every API call

* Add new lines to end of svg files

* Add better error handling

* Fix edge case where input is not numeric

* Finalize Stackexhange tag design and functionality

* Fix css typo

* Update snapshots

* Fix snapshot back
2019-08-14 15:01:47 -04:00
Ben Halpern
321560b751
Fix linting (#3714) 2019-08-13 20:32:01 -03:00
Jacob Herrington
97d04df965 Add place holder alt text to markdown link (#3687) [ci skip] 2019-08-12 11:57:06 -04:00
Bolarinwa Balogun
4dd90c5dd1 Fix upload overlap with editor/help page (#3640)
* Fix upload overlap with editor/help page

* Update test snapshot
2019-08-07 15:35:28 -04:00
Mario See
36535e546d Listing Dashboard: Handle expired listings (#3442)
* wip filter active and expired listings

* add published attribute to listings json

* add expired class to listings row

* filter through state

* make span button tabbable

* remove unused state

* update snapshot test

* add indicator and styles for expired

* linting errors

* clean up link

* remove function argument

* Update listingDashboard snapshot
2019-07-29 12:42:32 -04:00
Ben Halpern
ee00b460bf Add getunopenedchatchannels to onboardingredirect (#3565) 2019-07-29 09:33:36 -04:00
Andy Zhao
9f34dcd0eb Make window.currentUser available globally (#3550) 2019-07-26 19:26:47 -04:00
Ben Halpern
640ada4948
Tiny adjustments to copy and functionality of onboarding (#3549) 2019-07-26 16:56:44 -04:00
Ali Spittel
52c60ce37e Feature/refactored onboarding (#3333)
* set up refactored onboarding

* create onboarding page

* add in first slide and change slide functionality

* fix test suite

* profile refactor

* profile refactor

* refactor to api

* add checkbox fields

* add checkbox fields

* remove puts

* add basic css

* add styling

* add redirect

* hide back and next at first and last slides

* test refactored onboarding

* test refactored onboarding

* remove article edits

* Fix schema

* Add deleted file back in

* Add default value for checked_t&c column

* Adjust HTML structure to keep nav buttons in place

* Fix ESLint issues on Onboarding.jsx file

* Handling for undefined or empty followedTags on getUserTags

* Fix codeclimate issues

* Fix codeclimate issues

* Fix more codeclimate issues

* Fix more codeclimate issues

* Update Onboarding snapshots

* Uncheck the CoC and T&C checkboxes on render

* Update snapshots

* Return false instead of raising error

* Update spec to use new onboarding

* Redirect to onboarding if haven't seen it yet

* Prevent redirect to onboarding from /signout_confirm

* Use assign_attributes instead of saving twice

* Move COC and T&C checkbox page to second slide

* Add 'go back to original page' functionality

* Reuse ready prototype logic

* Keep track of the last visited onboarding page

* Fix email subscription bug

* Fix overflow issue for tags page

* Remove height to prevent page container scrolling

* Check for CoC and T&C for displaying onboarding

* Add InstantClick redirect and preserve referrer in client

* Fix async update + check by using localStorage

* Turn off onboarding for tests

* Finalize design for onboarding

* Finalize design for onboarding

* Make bulk follows during onboarding

* Fix bulk follow test
2019-07-26 15:53:32 -04:00
Kitten King
6290451273 Fix Typos (#3510) 2019-07-22 12:56:48 -04:00
Bolarinwa Balogun
cdd8870de5 Add copy button to markdown image upload (#2957) 2019-07-17 11:05:21 -04:00
Elecweb
ebf9208877 Add support for hotkey to toggle article preview (#3308) [ci skip] 2019-07-16 14:35:45 -04:00
Ben Halpern
47eaa9ece1
Adjust listings social image and add "About Listings" button to show page. (#3468)
* Adjust size and contrast for listings social preview

* Add about listings button and modify listings css
2019-07-12 16:40:39 -04:00
Mario See
1fcd6bb77b Fix location link in listing (#3464) 2019-07-12 13:02:12 -04:00
Sushant Bajracharya
01d1d1bcea Make the Preview button dynamic (#3317) 2019-07-10 19:14:14 -04:00
Mario See
699d8703c9 Make listing dashboard sortable (#3421) 2019-07-10 18:24:53 -04:00
Mario See
11be56f38c Add location to listings (#3370)
* add location to classified_listings

create rails migration and ran rake db:migrate

* add faker city to seed

* add location to index json

* add location as searchable attribute in algolia

* add form text field for adding location to new listing

* add location to dashboard json

* add location field for editing listings

* add location to listing_params in controller

* add location to single listing view

* add location to listing row in dashboard

* add location to dashboard test

* adjust listing dashboard row spacing

* reduce character limit

* reduce lines of conditional html elements

* compress listing card const

* fix form call for location in edit page

* update snapshot in dashboard

* add location length validation in listing model

* shorten limit and update location in edit page
2019-07-10 12:45:41 -04:00
Mac Siri
90f54773dc
Fix GistTag & RunkitTag preview issue (#3388) 2019-07-09 15:58:08 -04:00
rhymes
209b0ba607 History and reading list refactoring (#3338)
* Make readingList testable

* Make history and readingList more similar

* Extract ItemListTags component

* Simplify load next page logic

* History and reading list load more should be the same

* Extract ItemListLoadMoreButton component

* Use the same exact CSS for both

* Use empty instead of 0

* Extract ItemListItem component

* Remove unnecessary else

* Same search function

* Use a common module to group related functionality

* Extract loadNextPage and fix load more button presence logic

* Extract toggleTag

* Refactor toggleStatusView and pass page

* Added additional tests
2019-07-02 09:22:21 -04:00
Bolarinwa Balogun
bd360c7cf4 Make item count 'empty' instead of '0' when reading list is empty (#3320) 2019-06-28 07:55:43 -04:00
Mario See
4e75108d8b Fix escape key handling and add space in single listing view (#3306)
* add space and handle escape key down

* properly handle escape
2019-06-26 09:58:48 -04:00
rhymes
7da7a16d8d Pro: add referrers to dashboard and single article stats (#3295)
* Reorganize PageViewsController

* Add domain and path to PageView model

* Add before_create callback to populate domain and path

* Add list of referrers to AnalyticsService

* Add referrers to the UI

* Remove useless referrers card and tweak table line height

* Add referrer stats to article stats page

* Add not null and empty default to domain and path

* Refactor JS analytics client

* create_list is a step back here

* Revert "Add not null and empty default to domain and path"

This reverts commit bc02440076047a887c65d300bccd4661ecc8ffd0.

* Add index on domain concurrently

* Make the script more robust
2019-06-25 13:58:09 -04:00
Bolarinwa Balogun
bc54f30365 Add Item Count to Reading List Header (#3162) 2019-06-25 09:41:28 -04:00
rhymes
e3c2bf08e6 Deduplicate history items (#3279) 2019-06-25 08:42:01 -04:00
Ben Halpern
dcbb188cf1
Add pinned articles box to profiles (#3269)
* Initial pins work

* Add pin box to profiles

* Fix test snapshot spacing and optimize svg

* Fix listings spacing
2019-06-24 15:18:29 -04:00
Thanawat Senawat
6fc17a29cb Feature/reading list loadmore button (#3221)
* Add Load More Button to Reading List

* Set state showLoadMoreButton is false
2019-06-20 13:33:02 -04:00
rhymes
55634ad68f Display stats for organization article (#3232)
There was a bug where the frontend was not passing the organization id to the backend, and thus the fetching of the stats failed for organization articles.

This also adds a bit of error handling for `fetch` API
2019-06-19 09:17:35 -04:00
rhymes
2bf54edb9c Pro: History (#3220)
* Add base history support

* Add tags and ranking and make it work

* Fix styling

* Add article title and text excerpt to the index

* Add pagination support

* Debounce the search to 300ms

* Show history only to pro users

* Use routing helpers instead of hardcoding

* Raise the page size to 100

* Remove console log

* A bit of regrouping
2019-06-18 14:58:24 -04:00
Mario See
9e616de9f8 Listings Dashboard (#3014)
* init wip react components

* wip add dashboard to listing views

- create a html.erb view to hold listing/dashboard with javascript_pack_tag
- create listingDashboard.jsx in packs
- create listingDashboard component and dashboard folder with smaller components
- added view to controller and routes

* slowly adding some formatting

adjusted styling, info

* remove listing body from dashboard

* add some styling and adjust info

* wip adding org listings

* wip multi org in dashboard

* adjust for multi org

* add styling and better multi org support

* comment out bump and delete -- save for upcoming PR

* reduce lines

* listing form has link to listings dashboard instead of listings

* adjust header boxes flex direction for mobile

* fix organization id query

* WIP testing

needs more rigorous tests

* finalize tests
2019-06-18 14:52:59 -04:00
Ben Halpern
d33cc055dd
Adjust notification subscriptions JS and css (#3165) 2019-06-14 18:54:42 -04:00
Ben Halpern
e130400e9e
Finalize UI for all types of notification settings (#3164) 2019-06-14 18:28:38 -04:00
Andy Zhao
b953f17d0c New Feature: Subscribe to posts! (#3149)
* Add MVP of notification subscriptions

* Add rate limiting for notification subscriptions

* Show modal for logged out users on subscribe click

* Add enter key functionality for checkbox

* Add relationships for notification subscriptions

* Add model test for notification subscription

* Deprecated article mutes in favor of notification subscriptions

* Deprecated comment mutes in favor of notification subscriptions

* Move comment muting tests and logic over

* Merge comment and article muting into subscriptions

* Remove redundant check

* Use database to check for rate limit instead of cache

* Test for subscriptions handling notifications properly

* Fix notification model spec for subscriptions

* Fix tests for subscriptions

* Remove rate limiting

* Properly handle logged out users getting subscription status

* Fix test for new pattern

* Update reserved words

* Add config column to notification subscriptions

* Add logic for top level config and move tests

* Test for top level subscribers getting notified

* Fix logic mistake oops

* Add index and refactor comment_user_ids
2019-06-14 12:03:43 -04:00
rhymes
7f2045b250 Pro Analytics: stats for a single article (#3120)
* Add /stats endpoint for articles, opened only to Pro users

* Add analytics to article stats page

* Add stats button to the article page and test stats page
2019-06-13 19:02:09 -04:00
rhymes
6960b89f28 Dashboard Pro: support InstantClick and show org analytics (#3102)
* Fix JS lint issues

* Do not rely on globals

* Use InstantClick to make transitions work in the pro dashboard

* Fix eager loadings and remove unused queries

* Refactor drawChart

* More consistency in naming

* Display correct analytics for organization
2019-06-12 09:40:42 -04:00
Mac Siri
f62bc7faa8 Fix js-breaking webcomponent (#3087)
* Remove webcomponents-loader

* Add unpkg webcomponent-loader

* Update clipboard-copy-element to include @githubscope

* Make WebComponent loading async

* Simplify clipboardCopy
2019-06-10 11:23:42 -04:00
Daniel Compton
f75aef42f9 Add a space between "Change meta tag" and canonical_url (#3063)
Without the space, this shows up as "Change meta tagcanonical_url".
2019-06-07 21:15:32 -04:00
briwa
7c254dc8bf Remove an extra @ in Connect (#3040) [ci skip] 2019-06-04 14:43:37 -04:00
Ben Halpern
119d0f69d6
Finalize multi-org features (#3041)
* Finalize multi-org features

* Fix credits count issues

* Only show org list if multiple orgs on dashboard

* Add check for organizations to JS
2019-06-04 13:56:22 -04:00