dev.to Repo Recap from the Past Three Weeks
Andy Zhao (he/him)
Posted on March 20, 2019
Welcome back to another Repo Recap, where we (usually) cover last week's contributions to dev.to's repository and the iOS repo. This edition is covering February 24 to March 15.
Some of you might be wondering why it's such a long post! I've decided to change up the format and covering the past week as opposed to the previous week's changes. This will be more true to the title of the post, and I think it'll be more interesting to be more up-to-date. Anyway, let's dive in!
Features
- We released organization notifications! If you're a part of the organization, you've probably seen it already in your notifications. Check out the PR for technical details, and the changelog post for more specifics.
Organization Notifications #1762
What type of PR is this? (check all applicable)
- [x] Feature
Description
This adds notifications for organizations!
Implementation details:
- Anyone who is a
member
of the organization can view the org's notifications. - Any org member who views the org notifications will mark them as
read
. - The routes are:
/notifications/org/:org_id
and/notifications/comments/:org_id
. This keeps it flexible for people who belong to multiple orgs. - There is no filter for
posts
because orgs can't follow people (and therefore cannot receive notifications for new posts). - Orgs can receive new comment and reaction notifications on their org posts, as well as notifications for new followers.
- Org notifications are not counted in the bell icon.
- Notifications can belong to either a user or an organization. One or the other, not both. I could add a database constraint but that would require some custom SQL. Not sure if it's completely necessary.
One feature I forgot -- I remembered just now while writing is -- is the ability for orgs to send a new post notification to their followers. I can add this in if we want. Don't think it would take too much time. Just added this
Related Tickets & Documents
Resolves #1222
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Mobile View
Desktop View
[optional] What gif best describes this PR or how it makes you feel?
New Feature: Organization Notifications!
Andy Zhao (he/him) for The DEV Team γ» Feb 25 '19
- @ben added additional streak badge rewarding, specifically to reward eight and sixteen week streaks! Here's an example of the eight week streak badge.
Add additional streak badge rewarding #1896
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Streak badges
- We now have an indicator that shows who the original author is in comment threads! Thanks @sadarshannaiynar for the main contribution!
[Fixes #403] - Added OP badge to the commented user #461
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Adding "OP" badge similar to "ASK ME ANYTHING" in the comments for original poster
Related Tickets & Documents
#403
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
- @aspittel added the autosave feature to V2 editor! Check out her changelog post for more details.
Feature/autosave editor #1633
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Add base functionality for autosaving drafts
Related Tickets & Documents
https://github.com/thepracticaldev/dev.to/issues/442#issue-353140423
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
- We added an "experience level" attribute for posts. It's still experimental, and is meant as a "gentle indicator". More details in the changelog post, by Ben:
Add experience level averaging to articles #1922
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
This feature gives users the ability to input their experience level in order to modestly affect what they see in their home page.
Currently if you are a very experienced developer (a self-described 9/10), the home page may not be as useful to you because a lot of the content can trend towards the more beginner stuff due to volume of readers. This provides some customization in order to have a slightly more relevant home screen.
Experience level for a post will be voted on by the crowds. Currently it is for mods, perhaps this could be expanded but we wouldn't want to fill the user experience with too many options for the casual user.
As we see how this goes, we could complement this functionality with inferential signals to help, but in general it's nice to give users the power over their experience.
Added to /mod
This is done by voting to produce an average via the wisdom of the crowds.
For the end user, it's a pretty silent PR, though we could ultimately do more things with the site's mechanics now that we will have a decent approximation of how advanced the content is.
[optional] What gif best describes this PR or how it makes you feel?
New Experimental Feature: "Target Experience Level" for Posts
Ben Halpern for The DEV Team γ» Feb 28 '19
- @m1guelpf added the the Blogcast Liquid tag, based on their own personal side project! Thanks, Miguel!
Feature/blogcast liquid tag #1891
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [x] Documentation Update
Description
I use Blogcast to generate audio versions of my articles, and as Dev.to doesn't allow raw embeds, I figured out I'd try to add it.
(DISCLAIMER: Blogcast is not a free product ($0.50/article), and I'm the creator. I'd totally understand if any of those things made you reject the contribution. Just wanted to contribute something, no hard feelings
Related Tickets & Documents
- N/A
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
- N/A
Added to documentation?
-
[ ] docs.dev.to
-
[ ] readme
-
[ ] no documentation needed
-
[x]Β liquid tags documentation page
[optional] What gif best describes this PR or how it makes you feel?
- We added milestone notifications! When you hit a certain amount of views or reactions, you'll get notified and we'll all celebrate! More details in the changelog post.
Add Milestone Notifications #1920
What type of PR is this? (check all applicable)
- [x] Feature
Description
This PR adds milestone notifications! Milestones are achieved when your post reaches the following:
- 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, or 1048576 total views
- 64, 128, 256, 512, 1024, 2048, 4096, or 8192 total reactions
This feature accounts for users and organization posts, and is flexible for any other sort of milestones we want to add.
Related Tickets & Documents
Resolves #1647
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
[optional] What gif best describes this PR or how it makes you feel?
New Feature: Milestone Notifications!
Andy Zhao (he/him) for The DEV Team γ» Mar 1 '19
- As part of the milestone notification push, @thesoreon added some more celebratory gifs! Feel free to contribute, following a similar pattern to this PR. Thanks, @thesoreon!
add gifs to random_gif.rb #1945
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
It appends new gifs to generate for milestone notifications
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
- @ben added the initial version of the pro dashboard. More details to come!
Basics of pro dashboard #1971
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
This is a concept feature which will live in private beta for a little while. It will help some users with specific needs and act as a test ground for general rollout features. This is the basic first cut just to get an idea into the universe.
- You can now use tag templates with the v2 editor! This means visiting https://dev.to/new/discuss will automatically add the discuss tag to your new post. PR by Ben:
Add tag template to v2 editor #1972
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [ ] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
- @wuz also added some new gifs for milestones. Thanks, Conlin!
Add new gifs to random_gif.rb #1944
What type of PR is this?
- [x] Feature
Description
This adds a few more success/celebration gifs to the random gif file!
Related Tickets & Documents
N/A
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [x] no documentation needed
What gif best describes this PR or how it makes you feel?
Here's all the ones I added. They all are a good representation!
- We added the
x
minutes ago feature to recent posts in the feed. PR by Ben:
Add time ago to recent posts in feed #1981
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
For posts published within the day, indicate how many seconds, minutes, hours ago the post was made.
- @rhymes made a PR which displays a comment's timestamp according to your time locale! Thanks, @rhymes!
Display comment published timestamp according to user's locale #1970
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
This PR does two main things:
- embeds a ISO 8601 timestamp in each
comment-date
tag - displays such timestamp as a title (hence triggered by hover) with a string converted to the the user/browser's locale
It contains a few additional things:
-
I've moved
.eslintrc.js
from the main folder toapp/assets/javascripts
and set the correct ECMA version. The reason is that my VS Code kept complaining the code wasn't ES2016, which it isn't, it's ECMA 5. The folder with the "modern" JavaScript isapp/javascript
and it already has its own ESLint configuration file. -
I've deleted
app/assets/javascripts/utilities/getLocalTime.js
because it wasn't used anywhere and it contained a duplicate function already contained inside initializeTimeFixer.js
A note: I couldn't test it with the "reading list -> comment activity" comments because I'm swamped by async jobs that are taking forever. If anybody has suggestions about what to do with those (beside delete them) please let me know. This is my current situation locally:
Related Tickets & Documents
Closes #406
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
This is how it looks if I set my browser to Italian for example:
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
- @rykilleen added a "skip content" feature for anyone using a keyboard to navigate around. Thanks, @rykilleen!
add markup and styling for skip link #2062
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
This styling and markup change provides a useful link for keyboard only navigation users to jump right to the content of the site. More info and WC3 links in the issue!
If there are any concerns with the transition styling I'm happy to remove! In past experience we've found it draws attention for users who might not catch the UI change. Thanks!
Related Tickets & Documents
#1153
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
- We recently added settings for you to customize your display settings. This includes the beta version of our dark mode, as well as font settings for posts. PR by Ben:
Allow users to configure to use night mode (beta) and sans-serif article body #2072
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Some users may want night mode for reading or sans-serif fonts for any number of reasons: personal preference, accessibility, etc.
This config gives that option
There's still work to be done to get night mode looking just right, but this PR should speed that up, as more folks will start using it. Thanks to @link2twenty for the great work on themes.
The implementation of the sans serif css could be done theme style but I wasn't sure, so I did it this way. We can change later.
- You can now chat with people a little more easily! If you and someone else are following each other, then you'll see a chat button on their profile. More related features to come. Thanks, @mariocsee!
Implement open inbox for dev-connect #1563
What type of PR is this? (check all applicable)
- [x] Feature
Description
This PR adds open inbox to users that want to allow others to message without mutually following each other.
The column inbox_type
is added to Users with "private" as the default value. The only other option right now is "open." This can be changed under settings/misc
.
An inbox_type
of "private" retains the previous (default) behavior of DEV Connect, where only users that mutually follow each other can send messages to one another. Now, if you view a user you follow and that follows you, a chat button will be displayed beside the following button.
An inbox_type
of "open" displays a chat button on your profile and allows any user, whether you mutually follow each other or not, to open a chat with you on DEV Connect. This works by calling the open_chat
method in users_controller
and creating a chat channel (if none already exist between you and the user with an open inbox) and redirect you to dev.to/connect/@username
.
To-do:
- [x] Add initial message (when a new channel is opened, the default message on top is "You and @mozellmrsprohaska are connected because...", but with an "open"
inbox_type
that message is false and needs to be changed for clarity) - [x] Chats that are made inactive because of unfollows can be made active again if inbox_type is open
- [x] Rspec tests for
follows_controller
pass given changes inshow
Related Tickets & Documents
resolves #1460
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
settings/misc
Changing your inbox type in
Follow Back button for users that follow you
Users that you follow and follow you have a chat button that redirects to the chat channel between you
Manually changing inbox type to "open" for testing in local environment
New chat for users with open inbox type
connect/@username
If you mutually follow someone who has an open inbox, it will prioritize redirecting straight to Added to documentation?
- [x] no documentation needed
- @mariocsee added an author's username to the right sidebar of a post. Thanks, Mario!
Add username to author info in articles #1912
What type of PR is this? (check all applicable)
- [x] Refactor
Description
Added username to author sticky nav and about the author sections.
Related Tickets & Documents
Resolves #265
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
About the author section at the end of the article doesn't show up for me in development, but I did make the changes in the file that handles it.
Added to documentation?
- [x] no documentation needed
Bug Fixes / Other Contributions
-
@picocreator added the
SEND_LOGS_TO_TIMBER
environment variable to enable or disable logging to Timber (our logging service). Thanks, @picocreator!
Feature : `SEND_LOGS_TO_TIMBER` env variable to enable or disable timber logging #1933
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Added the SEND_LOGS_TO_TIMBER
environment variable with false/true default for dev/production modes.
This allows configuration disabling of TIMBER - in "production" mode.
PS : Im not a ruby dev - so someone should really double check before merging
Related Tickets & Documents
https://github.com/thepracticaldev/dev.to/pull/1844 - to streamline production mode for docker build
Added to documentation?
- [x] no documentation needed
[optional] What gif best describes how it makes you feel?
- Thanks to @lightalloy for enabling the
delayed_job
web interface, which should help us debug failed background jobs.
Enable delayed_job web interface for admins #1967
What type of PR is this? (check all applicable)
- [x] Feature
Description
Enabled delayed_job web interface for admins in production (and others) environment.
Related Tickets & Documents
#1857
- @lightalloy fixed an issue with a background job when unfollowing someone. Thanks, Anna!
Fix delayed job errors related to follows #1621 #1835
What type of PR is this? (check all applicable)
- [x] Refactor
- [x] Bug Fix
Description
Fix Delayed::DeserializationError: ActiveRecord::RecordNotFound
related to destroyed Follow
s .
- moved async methods to separate jobs
- added checks to ensure that a follow still exists
- added specs for the
Follow
model, (for theafter_create
/after_save
callbacks behavior) - I have also added gem
delayed_job_web
for thedev
environment for debugging purposes
I kept the old methods #touch_user
, #touch_user_followed_at
and #create_chat_channel_without_delay
, #send_email_notification_without_delay
which were used before, in case there will be jobs, which were created but were not executed by the deploy time.
Related Tickets & Documents
#1621
- @lightalloy also started the process of moving some Rails model callbacks into background jobs.
Bust cache on article destroy instead of resave articles #1621 #1801
What type of PR is this? (check all applicable)
- [x] Refactor
Description
In the current implementation, when an article is destroyed, all the "sibling" articles of the (destroyed) article organization are resaved. Resaving triggers several callbacks, which create a lot of delayed_jobs. That takes plenty of time and resources. There's no need to resave articles, it's enough to bust their cache.
What happens on article destroy after the refactoring:
- instead of resaving organization articles, their cache is busted
- user articles cache is busted asynchronously
Related Tickets & Documents
#1621 Not directly related to the ticket (not fixing errors), but contains refactoring for the related code.
-
@glennmen and @arnellebalane took on the task of fixing the linting issues with the files in
app/views
! I've included the link to GitHub for all of them. Big thanks, @glennmen and @arnellebalane! @ben resolved a small bug where posts that were crossposted were not showing up in the proper order. Thanks, Ben!
Adjust article ranking algorithm to use crossposted_at where available #1917
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
Currently crossposted articles take a hit in the algorithm if the post was first published elsewhere. This fixes it.
- @sashka added a test for validating a badge image. Thanks, @sashka!
Add test for validation badge image #1909
What type of PR is this? (check all applicable)
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Add test for validation badge image
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
- @lightalloy fixed a background job error related to removing a reaction. Thanks, Anna!
Fix delayed job errors related to reactions #1621 #1883
Fix Delayed::DeserializationError: ActiveRecord::RecordNotFound
related to destroyed Reaction
s .
* moved async methods to separate jobs
* added checks to ensure that a record still exists
* added specs for the `Reaction` model, (for the `after_save` callbacks behavior)
I kept the old methods #touch_user_without_delay
, #update_reactable_without_delay
, #occasionally_sync_reaction_counts
, #bust_reactable_cache_without_delay
which were used before, in case there will be jobs, which were created but were not executed by the deploy time.
- @mariocsee fixed an issue where a comment left on a podcast's episode would not appear immediately. Thanks, Mario!
Podcast episode comment refresh #1931
What type of PR is this? (check all applicable)
- [x] Bug Fix
Description
Spent a few minutes trying to figure out #1788 and saw Andy's comment after I'd scrolled down... so I inserted the line where he suggested. I suppose there will be a future PR that would intended behavior to send_new_comment_notifications
for comments on podcast episodes.
There's some console errors that don't break anything in development that I attached in the screenshots below.
Related Tickets & Documents
resolves #1788
Mobile & Desktop Screenshots/Recordings
@Zhao-Andy comment on 1788
Console
Added to documentation?
- [x] no documentation needed
-
@lightalloy fixed the a bug where the
SAVE(D)
button was not rendering correctly in the reading list. Thanks, Anna!
Update save(d) button states after articles are loaded, fixes #1785 #1927
What type of PR is this? (check all applicable)
- [x] Bug Fix
Description
- Update "save(d)" button states after articles are loaded (in the reading list)
- Did several style fixes required by
eslint
, and still had to disable several cops for theinitializeReadingListIcons.js
file
Currently, the states of the buttons are updated several times on a page load which is not always needed in my opinion. But the logic is shared between the homepage, the reading list, and other article pages, so I decided to keep it as is.
Related Tickets & Documents
#1785 This probably fixes #1395, but ideally, I would recommend more research and code refactoring on this issue.
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
-
@rhymes refactored the
ArticlesController#feed
(articles controller, feed action). Check it out below! Thanks, @rhymes!
Simplify ArticlesController#feed #1932
There's unneeded complexity in the logic of the feed method, this way what separates each path should be clearer.
What type of PR is this? (check all applicable)
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
I came across ArticlesController#feed and noticed that the ORM logic was a bit convoluted and repeated in each if/else clause. Since AR is a lazy and composable ORM, I decided to simplify the logic.
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
- @vizvamitra fixed a bug related to the RSS feed, with tests to boot. Thanks @vizvamitra!
Fix articles feed not filtering articles by user/organization #1941
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
A bug was introduced in #1932, leading to unwanted articles in user/organization feeds. @articles
scope was not being updated propperly depending on :username
param.
Related Tickets & Documents
#1940
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
fix #1940
- @shindakun removed extraneous forward slashes in our RSS feed reader. Thanks, @shindakun!
Remove stray forward slashes in RSS feed builder #1943
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
- URLs in the Link and GUID field in RSS have an extra slash. This PR removes stray
/
from lines 17 and 18.
Related Tickets & Documents
closes #1942
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
Add GitDocs to "π Key App tech/services" [skip ci] #1951
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [X] Documentation Update
Description
I just added GitDocs to "
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [X] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
- @lightalloy reduced the number of queries when displaying articles flare tags. Thanks, Anna!
Make less queries when displaying articles flare tags #1957
What type of PR is this? (check all applicable)
- [x] Refactor
Description
- cached flare tag in a variable for the view
- refactored
FlareTag
- moved
FlareTag
specs to its own file
- @glennmen fixed an issue where there was "Mixed Content" in the O RLY Parody Book Generator. Thanks, @glennmen!
Fix Mixed Content error in O RLY Parody Book Generator #1993
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
I was going through the routes file and found some interesting pages. I also noticed that this page wasn't working correctly, 2 images were not being displayed correctly. 1 fixed the first one, the second one doesn't seem to exist anymore but looking at the url it seems to be a heart GIF. If anyone has a good replacement let me know and I will add it, for now I have hidden it so you don't see a broken image.
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
- @mkrl cleaned up the relative paths for both anchors and images in GitHub Liquid tag embeds. Thanks, @mkrl!
Clean relative paths for both anchors and images in GitHub liquid tag embeds #1987
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
Run clean_relative_path!
for both a
and img
elements.
Related Tickets & Documents
Fixes #1976
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
- @glebec fixed an issue with the Runkit tag where double quotes were not properly parsed. Thanks, @glebec!
fix(runkit): Allow double quotes in preamble #1938
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
NB: This is not a WIP per se; however, it should not be merged without verifying that it still addresses whatever (unspecified) security concerns motivated the original PR (#1808).
Description
Restore >
character to sanitization string for runkit preamble, consequently re-allowing double quotes as a valid JS token.
Related Tickets & Documents
Closes #1937.
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
-
@hkrogstie fixed a bug where
undefined
was being returned for the "x
minutes ago" text of a post. Thanks, @hkrogstie!
Fix undefined returned by timeAgo, showing up after the post date of older posts #2002
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
Rewrite the timeAgo function such that it never returns undefined. The new optional parameter allows the caller to specify what the cutoff is for including a time ago-string. The default value is extracted from the previous code
Related Tickets & Documents
Fixes Issue #1995
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
-
@davidcelis added
xoxo.zone
to the allowed Mastodon instances. Thanks, @davidcelis!
Add xoxo.zone to the allowed Mastodon instances #2009
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
Yet another Mastodon instance. TBH, the whitelist seems weird. There are so many Mastodon instances
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
Fix typo in surrogate key header #2013
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
There was a typo in the surrogate key header in that it referred to the username parameter as "userame" which affects the usefulness of the key.
- @lightalloy optimized a few pieces of our main controller. Thanks, Anna!
Optimize stories #1988
What type of PR is this? (check all applicable)
- [x] Refactor
Description
- Added index to articles path, since queries by path are popular when retrieving articles
- select only needed columns for tag colors
- Make fewer SQL queries on retrieving sticky article collection
-
@keshavbiswa fixed a bug where the "
x
minutes ago" text of a post was only showing up for alternating posts in the feed. Thanks, @keshavbiswa!
Fixed time ago bug. #2015
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
The time ago label in latest page was getting rendered on every alternative posts.
Related Tickets & Documents
#2012
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
No Documentation required.
- @lightalloy refactored the process of sending a new follower notification to a background job, and added some checks along the way. Thanks, Anna!
Don't send new follower notification when followable is a tag #2041 #2050
What type of PR is this? (check all applicable)
- [x] Bug Fix
Description
- added checks to ensure followable is a
User
or anOrganization
before sending a notification - added specs
Related Tickets & Documents
#2041
- @rhymes made a quality of life change when updating the tag points. It's now only allows numbers as values. Thanks, @rhymes!
Dashboard: use numerical input for tags points #2057
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Documentation Update
Description
Currently the Dashboard -> Following page tags allow inputing text instead of numbers. Since those are floating points they will be rejected after the submission of the page, using a HTML numerical input with step
set to any
any valid number (integer or float) is accepted.
This was inspired by @link2twenty's comment on #1346 (in the spirit of submitting smaller PRs eheh)
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Positive numbers
Negative numbers
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
Fixed typo on notifications state #2047
What type of PR is this?
- [x] Bug Fix
Description
"Notificatins"
- @aspittel gave the pro dashboard a dashboard-y makeover. Thanks, Ali!
give the pro dashboard a dashboard-y makeover #2058
What type of PR is this? (check all applicable)
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Restyled the pro dashboard!
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
- @keshavbiswa enabled two style related cops with Rubocop, the Ruby linter we use. Thanks, @keshavbiswa!
Rubocop Style cops enabled #2056
What type of PR is this? (check all applicable)
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
Enabled Style/Alias from Rubocop.yml and fixed all the related issues with it.
- Style/Alias
- Style/Attr
Related Tickets & Documents
#2021
Added to documentation?
- [ ] docs.dev.to
- [ ] readme
- [x] no documentation needed
New Issues and Discussions
- @juliatorrejon requested a feature where tags could be organized into topics and subtopics. Feel free time to chime in. Thanks, @juliatorrejon!
Organise and group tags by topics and subtopics #1864
Is your feature request related to a problem? Please describe. The usability of the tags is not fully clear when searching for specific topics and/or subtopics.
Describe the solution you'd like I think the functionality of the tags could be more valuable if they could be organised and grouped in a drop-down list by main topics such as Tools, Programming Languages, Tips, etc; and these, in turn, have detailed subtopics. For example:
- @fredogonzalezr requested a feature where you can login with email. Thanks, @fredogonzalezr!
Add email login #1865
Is your feature request related to a problem? Please describe. Current account login methods aren't the most suitable for keeping our account access safe.
Using GitHub or Twitter it's ok, but we must remember that they are communities separated from dev.to, they have their own rules and guidelines to determine which accounts must be deleted or suspended.
Also, as they are tech giants it might be hard to contact their support for any issue regarding our account, so losing access to our account in one of those services could mean to lose access to our dev.to account too.
Describe the solution you'd like Adding the possibility to login using an email address, this way we can keep our account access safe and separated from possible issues with any third party OAuth provider.
Describe alternatives you've considered Adding another OAuth provider like Google, for example, a non community oriented service, it's more unusual to have your account suspended, deleted or lost. (This is being discussed in #1595)
Another solution could be to have the possibility to unlink my current Twitter/GitHub account and then linking a new one before logging out from dev.to. But it's not useful if you get your account suspended and can't login to do so.
Additional context I've been experiencing issues with my Twitter account, I have tried to reach out their support but got no response. The best solution I have found is to delete my account and start a new one.
It means that if I didn't change the Twitter account associated with my dev.to account I will lose access to dev.to's account too. (Emailing Dev team for this, since it's not possible from dashboard).
- @swyx requested a feature where the table of contents of a post could be autogenerated. Thanks, @swyx!
[Feature Request] autogenerated table of contents #1868
Is your feature request related to a problem? Please describe.
Markdown header tags now have anchor tags, so we can generate tables of contents for the articles.
this encourages more browsable longer form content on dev.to.
optionally, we can make the TOC float in a sidebar.
Describe the solution you'd like
possibly use a TOC generator like https://ecotrust-canada.github.io/markdown-toc/
Describe alternatives you've considered
not doing anything
Additional context
i last filed this request here https://github.com/thepracticaldev/dev.to/issues/183 at my old job's github account. a prerequesite was adding id's on every header, which was done in Nov. its time to revisit this idea!
-
@simevidas requested a feature for adding support for the
<mark>
element
Consider adding support for the <mark> element #1870
The <mark>
element is useful for highlighting certain words and phrases in text, which reduces the βwall of textβ issue. Browsers already render this element using a yellow background.
I ask Dev.to to not strip the <mark>
element from the HTML output of articles. Authors can use this element in Markdown normally.
An example of how <mark>
improves the readability of content:
-
@lkopacz raised a bug where the
<video>
tag doesn't respect a post's container<div>
. Thanks, @lkopacz!
<video> tag in markdown doesn't respect the blog posts container #1885
Describe the bug I crosspost all my blog posts from my personal blog and in the most recent particular post I used a lot of video tags that were not using YouTube or Vimeo.
To Reproduce Steps to reproduce the behavior:
- Go to https://dev.to/new and create a new post.
- In the Markdown, add ` video tag like the one below
<video controls style="max-width: 590px;">
<source src="https://www.a11ywithlindsey.com/marcy-sutton-clapping-tweet-1fca86b197aff683ffd0a940e70e5737.mp4" type="video/mp4">
</video>
- In the Front Matter, keep
published: false
, but add all necessary fields save the post so you can video the page. - Go to the post, and see the video. It extends past the blog post container.
Expected behavior A video should have a max-width of the container.
Desktop (please complete the following information):
- OS: Mac Mojave
- Browser: Chrome Version 72.0.3626.109
- Version: 10.14.3
Add tags automatically to posts #1934
I was thinking about the feature of tag the posts "level" (beginner, intermediate, pro and so on). I thought it could be confusing for the user to determine which "level" is his/her post.
Fortunately, Nowadays, we can use Machine Learning and last NLP methods to do that kind of tasks automatically.
On the other hand, we could use this techniques even for tag posts categories, not friendly comments and so on.
What we need? We would need a big dataset of labelled posts to start working on it.
- @butonix raised an issue where in development mode, uploading a cover image in the v2 editor would error out. Thanks, @butonix!
Cover upload error #1935
Describe the bug Uploading a picture, getting an error.
To Reproduce Steps to reproduce the behavior:
- Go to 'http://localhost:3000/new'
- Click on '/images/Cover Image' upload image
Heads up:
main_image: is not a valid URL
- @giorgosk reported an issue where a post could show up twice in the the "more posts" section under the comments section. Thanks, @giorgosk!
Post related content appears twice after comments of post #1949
A related post appears twice after post and comments
To Reproduce Have seen it on this post https://dev.to/psnebc/install-drupal-console-536g and the double post is the "101 Bash Commands and Tips for Beginners to Experts" that appears on 2 different place. Have a look at screenshot but perhaps you can see it visiting the URL
NOTE: both times I tried to visit the URL I got first a "500 Error" and then on the 2nd attempt I would get the actual content. Perhaps its coincidental though.
Expected behavior Perhaps this space should be given to another post
- @maheshhost requested a feature where you can scroll to the top after reading a post. Thanks, @maheshhost!
Scroll To Top #1952
Please add scroll to top button . I read tech blogs daily from dev.to and some blogs are so lengthy so in the end we need to scroll to the top again so if there would be a scroll to top button it would be great for the readers to get to the top easily.
Thankyou
- @oscherler reported a bug where follow a team wasn't showing up properly in the "FOLLOWING" dashboard. Thanks, @oscherler!
Following a team does not seem to be doing anything #1958
Describe the bug
There seems to be a concept of Teams on dev.to, where posts are written by a member of the team, but are listed under the team name. But the Follow button on such posts does not seem to do anything,
To Reproduce
Steps to reproduce the behavior:
-
Go to 'https://dev.to/vuevixens/hands-on-vuejs-for-beginners-part-6-5e7l';
The author is Marina Mosti (marinamosti), but the post is filed under a Vue Vixens header, and the Follow button is for Vue Vixens (vuevixens):
- Click on 'Follow';
- Go to 'https://dev.to/dashboard/following';
- You are following neither Vue Vixens, nor Marina Mosti;
- Wait for Marina Mosti to publish a new awesome post;
- You are not being notified of the post.
Expected behavior
- Vue Vixens appears somewhere on your Following page;
- You are notified whenever any member of the Vue Vixens team publishes a new post.
Unless I misunderstood the whole team thing, that is. ;-)
Desktop (please complete the following information):
- OS: Mac OS 10.14
- Browser Safari 12
- @john_papa requested a feature where tags should link to the tag itself, no matter where they appear. Thanks, @john_papa!
Create links for tags everywhere they appear #1991
When I look at a post, in the many places that we can, I'd like to be able to click on the tags to see more like this. A consistent UX would be helpful on this, too.
Here is a summary view of a post in my dashboard where the tags are not links today
Here they are links, with underlines in the page https://dev.to/t/webdev
Here they are links with a color in the post itself
- @joshcheek reported an issue where the about page is out of date. Thanks, @joshcheek!
Changing your username leads to 503 "First byte timeout" #1994
Describe the bug A clear and concise description of what the bug is. Varnish cache first byte timeout error when changing username
To Reproduce Steps to reproduce the behavior:
- Go to profile
- Click on username
- Type new username
- Press submit
- 503 first bytes timeout Guru Mediation
Expected behavior A clear and concise description of what you expected to happen. Expected to change my username after hitting submit
Screenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
- Device: 2015 iMac 5k 27"
- OS: macOS 10.14.4
Additional context Add any other context about the problem here.
I've done everything I could on my end but this seems to be a server problem.
- @lightalloy wrote up an issue detailing the process of moving async notification methods to ActiveJob. Thanks, Anna!
Move async Notification methods to Active Jobs #1996
- move asynchronous notification methods to separate Active Jobs
- pass entities
id
instead of an object - add a check for the entity presence before following up
These methods are suspectible to causing delayed job errors (#1621), so they should be adressed first:
- [x]
send_new_follower_notification
#2030 - [x]
send_reaction_notification
- [x]
send_new_comment_notifications
Other async methods:
- [x]
send_to_followers
- [x]
send_new_badge_notification
#2474 - [x]
send_welcome_notification
#2485 - [x]
send_moderation_notification
- [x]
send_mention_notification
@copasetickid - [x]
send_tag_adjustment_notification
- [x]
send_milestone_notification
#2804 - [x]
remove_all
@cyrillefr - [x]
remove_each
@cyrillefr - [x]
update_notifications
@lightalloy
-
@bnb reported an issue where the large
manifest.json
icons are different than the smaller ones. Thanks, @bnb!
Large `manifest.json` Icons are different than main one. #1999
Describe the bug A clear and concise description of what the bug is.
With Chrome's newly shipped Desktop PWA feature, the 100% square 512x512
image in manifest.json
is being loaded instead of the rounded 192x192
version. On desktop/macOS, the square version doesn't look as polished as the rounded version would.
To Reproduce Steps to reproduce the behavior:
- Add dev.to to your desktop from the Chrome menu on Desktop:
- Click vertical dots menu > Install DEV Community
- Open up the app
- See the icon
π
Expected behavior Rounded-corners version of the image should be used for 512x512, not the square version.
Desktop (please complete the following information):
- OS: [e.g. iOS] macOS
- Browser [e.g. chrome, safari] Chrome
- Version [e.g. 22] 72.0.3626.119
- @michael-tharrington reported an issue where uploading a cover image on Safari would error out. Thanks, Michael!
Issue Uploading a Cover Image on Safari #2008
A user reported having troubles uploading their cover image in Safari:
"Hey hey team!
Just wanted to reach out cause I think I found an issue with image uploading for Safari.
I was trying to upload a cover image for my post https://dev.to/michael/silencing-the-lizard-brain-4leg but every time I hit done, nothing would show up.
Finally thought to look the console window and saw this on Safari..."
Additional context
- They were using our v2 editor.
- Here's a link to the image too if it helps - https://unsplash.com/photos/RxZUEaa4fik
- @mcataford requested a feature where notifications could have timestamps. Thanks, @mcataford!
Timestamps on notifications #2010
Is your feature request related to a problem? Please describe. I was looking at my Notification history earlier today and noticed that individual notification cards aren't timestamped, which can be a bit confusing if you are trying to look at a larger notification stream and need to know details about when replies were posted.
Describe the solution you'd like The timestamp of each notification should be visible in the Notifications tab.
Describe alternatives you've considered Opening up each notification, which gets troublesome really fast.
Additional context I'd be happy to take this on, but I'm not sure if it's a feature that was left out intentionally because of some technical limitation. It would be awesome to have that extra temporal context around notifications.
- @heyitry reported an bug where changing your username might sometimes not update the paths of your posts, and prevent you from viewing and editing them. Thanks, @heyitry!
Error when attempting to access unfinished/unpublished post #2014
Describe the bug Going in to attempt to finish a long-neglected unfinished post, I get an error 500.
To Reproduce Steps to reproduce the behavior:
- Go to my Dashboard
- Click on the title or Edit button of any one of the last three of four unpublished posts
- See error
Expected behavior View and/or edit post
Desktop (please complete the following information):
- OS: Windows 10 1809
- Browser Mozilla
- Version 66.0b12
It may be relevant that I originally signed up with an account linked to my Twitter handle, then started using my GitHub account, and after submitting an issue relating to that, my account was fixed. Possibly the latter posts were created after my GitHub account became my primary means of logging onto dev.to.
- @lightalloy made a reference issue for enabling Rubocop cops. Check it out if you would like to help us with any of them! Thanks, Anna!
Enable rubocop cops #2021
Is your feature request related to a problem? Please describe.
Currently, many rubocop
cops are disabled (see .rubocop.yml
), I think it would be beneficial to enable most of them. In such a way at least the new code will follow the guidelines.
Describe the solution you'd like I like the way how we dealt with the views linting problems (#1842) The similar approach is possible for the ruby code & the rubocop
The workflow I suggest:
- enable 1 cop from the
.rubocop.yml
- fix related issues if possible
- if it's not possible (or optimal), add exceptions to the
.rubocop_todo.yml
(there're already some examples) - make a pull request
For some cops, there are no violations in the code, so they could just be enabled. I can prepare a list of cops to enable if this issue gets approved.
Data export is not working #2031
Describe the bug
A couple of days ago I requested the export of my content on dev.to, the requeste generated the notice message but then I've never received the email.
I went back to check https://dev.to/settings/misc and noticed that the feature is still disabled:
which means that the async job in charge of exporting has not completed. It's either stuck or has died. That's also probably why I haven't received the email.
To Reproduce Steps to reproduce the behavior:
- Go to https://dev.to/settings/misc
- Scroll down to "Export content"
- Request an export
- Wait
Expected behavior
I'd expect the job to complete in a timely fashion, the email to be delivered and the feature to be re-enabled.
Desktop (please complete the following information):
- OS: macOS 10.14
- Browser: Firefox
- Version: 66
-
@jess requested that we support
<details>
/<summary>
tags in markdown. Thanks, Jess!
Support <details>/<summary> tags in markdown #2045
Is your feature request related to a problem? Please describe.
tags are support in github markdown and I'd like to use them on DEV as well.
- @john_papa requested a feature where you can embed code from a GitHub repo into a post. Thanks, @john_papa!
Embed GitHub Code #2046
I tried to embed a few lines of code in a post from github. It did not work, but would be cool if it did.
This would be the expected format, I think
{% github https://github.com/johnpapa/vscode-peacock/blob/master/.vscodeignore#L12-L17 %}
adding a "read" button to notification #2048
Is your feature request related to a problem? Please describe. It's not "frustrating", but I don't know how to remove a notification in my list. I only see the heart and the "save" button. Clicking on the article doesn't remove it from the notification list either (at least for me).
Describe the solution you'd like It would be nice to have an "x" or a "read" button to just acknowledge the notification and make it disappear.
Describe alternatives you've considered I've refreshed the page while on the notifications, and I've read an article linked from a notification. Both actions don't remove any notification.
Additional context Add any other context or screenshots about the feature request here.
- @jess opened an discussion on how we could provide tooling to connect people who would like help with editing their posts. Feel free to chime in! Thanks, Jess!
Asking/Volunteering For Editorial Help #2055
Is your feature request related to a problem? Please describe. Connecting people who need help editing their post to people who would be up for helping. As described by https://github.com/thepracticaldev/dev.to/issues/464#issuecomment-472454990 and something we've heard anecdotally, it can be intimidating to post.
Describe the solution you'd like We could have people request for help on their posts and send a notification to anyone with a 'volunteer editor' role but we'd need some form of version control or comment system on the unpublished post.
Describe alternatives you've considered Maybe to start, we can simply connect people to one another and have them handle the details off platform.
- I raised an issue where signing in could take too long, mostly because we have a high amount of SQL queries.
Lower amount of SQL queries used for signing in #2061
Currently, some people (myself included) are experiencing long sign in times, which usually end up timing out, thus preventing people from signing in.
Looking at Skylight we can see that the requests take on average 2.7 seconds. Looking deeper in the #github
or #twitter
actions we can see that there are a lot of repeated queries:
This can definitely be refactored and the amount of queries can be reduced. The main -- and probably only -- file that needs to be refactored is the authorization_service.rb file.
Of course, this should be approached with care, as this affects how people authorize themselves into the app. The sign in process should still work, and refactoring shouldn't cause any weird data leakage (probably hard to accomplish, but good to keep it in mind).
Changing the title of an article leads me to a search page #2068
Describe the bug I created a new article and saved it. Then I wanted to change the title and it got me to a page with the title "Search Results - Dev Community" that showed users, while the URL still includes the old title.
To Reproduce Steps to reproduce the behavior:
- Create a new article
- Save it
- Change the title
- Save it
- End up at the search results page
Expected behavior To get a new URL and end up in the editor again.
Desktop (please complete the following information):
- OS: macOS Mojave
- Browser: Firefox
- Version: 65.0.1 (64-Bit)
DEV-iOS
We haven't had any new issues or PRs merged lately. Feel free to check out the iOS repo, or download our iOS app on the App Store.
As we transition into this new format of the Repo Recap, I'll be posting another edition on Friday, covering March 16 (last Saturday) to March 22 (this coming Friday). Thanks again for reading!
Posted on March 20, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.