We wrapped up the final week of Hacktoberfest and are highlighting the amazing people in our community who have contributed to Forem's codebase!
We’re thrilled to share that we’ve had 13 contributors this week commit improvements across the many projects we have in our web, iOS, and Android apps 🎉
Thanks to the help of these wonderful folks, we’ve merged 22 PRs this week. Forem is still a small team so this amount of feature-building and bug-squashing is truly only enabled because of the community. As Forem grows, we intend to continue enabling the open source community to improve and expand our offerings with their invaluable help. We appreciate everyone for helping us sow this open source commitment from day one.
In no particular order, here are the folks who made commits this week, their GitHub profiles, and their merged PRs.
Extract subtitles to a constant to reduce allocations #11056
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [x] Optimization
- [ ] Documentation Update
Description
Subtitles don't change so we can move them to a constant and save some memory (if you need stats I can provide them) because this hash and strings are created every time title_with_timeframe
is called (which is 3 times on https://github.com/forem/forem/blob/467e99556cf1fc088bbd91ec0612d4a64ff91ffd/app/views/articles/index.html.erb).
This PR reduces the number of creations of this hash from 3 * number of calls of render "articles/index"
to 1. (Similar on tags/_meta
).
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Check if the title contains values from the hash.
Added tests?
- [ ] yes
- [x] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [x] no documentation needed
&
Remove duplicated nav in sidebar_nav #11053
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
This commit duplicated the nav
starting element.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Test if the nav works.
Added tests?
- [ ] yes
- [x] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [x] no documentation needed
&
Add following_tags_count to user sidebar stats cache key #11042
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Adding following_tags_count
gets rid of the issue when @user.last_followed_at
doesn't change.
This line is quite long. Is there any "repo" for cache keys?
Related Tickets & Documents
Closes #5657
QA Instructions, Screenshots, Recordings
Play with (un)following tags and check if the counter on the user profile changes.
Added tests?
- [ ] yes
- [x] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [x] no documentation needed
&
Extract dashboard posts sort options to a constant #11123
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [x] Optimization
- [ ] Documentation Update
Description
Extract sort options to a constant to reduce the number of allocations.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, as well as any relevant images for UI changes.
Added tests?
- [ ] Yes
- [x] No, and this is why: nothing changed in case of the feature
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [ ] README
- [x] No documentation needed
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
Truncate long tags in sidebar #11057
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
A popular tag with a long name causes a horizontal scrollbar in the sidebar
This PR truncates long tags and shows ellipses on text overflow.
Related Tickets & Documents
Resolves https://github.com/forem/forem/issues/10990
QA Instructions, Screenshots, Recordings
- In
rails console
create a new tag. Tags must be marked assupported
to appear in the sidebar. Eg:
Tag.create!(name: 'longnamethatcausesoverflow', supported: true)
- If you have more than 30 tags you may need to change the new tag's
hotness_score
so that it appears in the list. For reference: Here's the query that generates the popular tag list https://github.com/forem/forem/blob/4dde307a43b5d6c901bd4550d122accd86ce587e/app/views/articles/_sidebar_nav.html.erb#L81 - Navigate to
/
Added tests?
- [ ] yes
- [x] no, because they aren't needed (I think?)
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [x] no documentation needed
Replacing old button with crayon buttons to make it more visible #11080
What type of PR is this?
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Replaces old button with crayon button it also improves button visibility
Related Tickets & Documents
Closes https://github.com/forem/forem/issues/11081
QA Instructions, Screenshots, Recordings
Before
After
Added tests?
- [ ] yes
- [x] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [x] no documentation needed
&
Removing email prop and fixing test #11108
What type of PR is this?
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Email displayed in app/javascript/chat/ChatChannelSettings/ModFaqSection.jsx is now replaced with link to /contact page but it was still taking in email prop which it does not use. This PR removes that email prop
Related Tickets & Documents
Closes https://github.com/forem/forem/issues/11109
Added tests?
- [x] Yes
- [ ] No, and this is why
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [ ] README
- [x] No documentation needed
&
Refactoring EditorAction #10894
What type of PR is this?
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Refactoring editor actions
- Removing nested ternary operators for improving readability
- Converting class component to functional component
Related Tickets & Documents
closes https://github.com/forem/forem/issues/10947
QA Instructions, Screenshots, Recordings
- Create a post and publish it
- Edit a post
- Convert a post to draft
- Create a new post and save it as a draft
Added tests?
- [ ] yes
- [ ] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [x] no documentation needed
#11048 - clarify how to add multiple tags to a post #11082
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [x] Documentation Update I think? Updates user-facing text, but that documents how to use the product.
Description
Clarify that multiple tags should be comma-separated. Quickly resolves some user confusion (mine, probably others). Added to the help text in the sidebar, not the placeholder text, for greater accessibility. (Screenreader users don't see the placeholder; the placeholder disappears once you've started typing/have your first tag written and are wondering how to get the second one to work.)
Related Tickets & Documents
#11048
QA Instructions, Screenshots, Recordings
Make sure the text looks okay on the new post page; I don't know why it wouldn't, but also, I did not go through the full setup & run this locally.
Added tests?
- [ ] yes
- [x] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [x] no documentation needed
[optional] What gif best describes this PR or how it makes you feel?
Updated gitdocs.json links to `https` #11118
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ X ] Documentation Update
Description
Updated gitdocs.json links to https
The links for ruby
and api
on the docs had an insecure http link.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, as well as any relevant images for UI changes.
Added tests?
- [ ] Yes
- [X] No, and this is why: Not needed
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [ ] README
- [X] No documentation needed
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
A11y: Add shortcut to bookmark an article #11116
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Adds a shortcut on b
(for now?) to save an article as long as the user is focused somewhere inside the article.
Also adds a shortcut on the signup modal to close it on Escape
keypress. It helps to keep the navigation mouseless after pressing b
.
This will be more useful once #10468 is merged, but it can live on its own.
Also, b
is to discuss here. Other options have been discussed such as ctrl+s
.
Related Tickets & Documents
Closes #11018
QA Instructions, Screenshots, Recordings
- Focus on article (anywhere inside)
- Press
b
- Article is saved/unsaved
- Logged in: actually saves it
- Logged out: Opens the signup modal
Added tests?
- [ ] Yes
- [x] No, and this is why: not needed
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [ ] README
- [x] No documentation needed
[optional] What gif best describes this PR or how it makes you feel?
Refactor articles_controller #11122
What type of PR is this? (check all applicable)
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Refactor unless statement and remove unused variables from ArticlesController
Related Tickets & Documents
https://github.com/forem/forem/issues/3739
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, as well as any relevant images for UI changes.
Added tests?
- [ ] Yes
- [x] No, and this is why: Refactoring ticket
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [ ] README
- [ ] No documentation needed
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
&
Refactor UsersController #11143
What type of PR is this? (check all applicable)
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Removed unused method #less_than_one_day_old? and refactor a few lines of code inside UsersController
Related Tickets & Documents
https://github.com/forem/forem/issues/3739
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, as well as any relevant images for UI changes.
Added tests?
- [ ] Yes
- [x] No, and this is why: Refactoring task
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [ ] README
- [x] No documentation needed
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
&
Refactor Reaction model #11138
What type of PR is this? (check all applicable)
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Deleted unused methods that are not found/used across the repository in the Reaction model. Also fixed one issue on CodeClimate :) https://codeclimate.com/github/forem/forem/pull/11138
Related Tickets & Documents
https://github.com/forem/forem/issues/3739
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, as well as any relevant images for UI changes.
Added tests?
- [ ] Yes
- [x] No, and this is why: Refactoring task
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [ ] README
- [ ] No documentation needed
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
&
Fix backend link in config-env.md #11152
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [x] Documentation Update
Description
Backend guide link currently leads to a Github 404 page. This commit fix the issue and redirects to the correct backend guide link
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, as well as any relevant images for UI changes.
Added tests?
- [ ] Yes
- [x] No, and this is why: Documentation update task
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [ ] README
- [x] No documentation needed
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
Add admin config to always show manually selected users on "Suggested people to follow" list #10917
What type of PR is this? (check all applicable)
- [x] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
- Added a config to allow admins to choose to always show "Suggested users" instead of system-generated suggestions in "Suggested people to follow" screen.
I also made some related fixes:
- Fixed some missing whitespace in the description of "Suggested users" input field
- Refactored some tests related to "Suggested users" and this change to resolve the linting errors I encountered
Related Tickets & Documents
Closes #9367
QA Instructions, Screenshots, Recordings
http://localhost:3000/admin/config > Under "All Site Configuration" > Onboarding
-
I don't know if there is an easy way to see the onboarding process again but if you visit http://localhost:3000/users?state=follow_suggestions you can see the list of users in JSON format. You can validate that the list changes according to this config.
Added tests?
- [x] yes
- [ ] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [x] no documentation needed
Updated docs README URL #11161
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [x] Documentation Update
Description
The links on the documentations are not correct
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, as well as any relevant images for UI changes.
Added tests?
- [ ] Yes
- [x] No, and this is why: this is a documentation update
- [ ] I need help with writing tests
Added to documentation?
- [ ] Docs.forem.com
- [x] README
- [ ] No documentation needed
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
&
removed envied docs #11160
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [x] Documentation Update
Description
Since ENVied Gem has been replaced by "dotenv" gem in the recent PR: https://github.com/forem/forem/pull/9767, the documentation should be update too.
Related Tickets & Documents
Related PRs: https://github.com/forem/forem/pull/9767
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, as well as any relevant images for UI changes.
Added tests?
- [ ] Yes
- [x] No, and this is why: this is a documentation update
- [ ] I need help with writing tests
Added to documentation?
- [x] Docs.forem.com
- [ ] README
- [ ] No documentation needed
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
Introduce twitter_timeline liquid tag (#7605) #10825
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [x] Documentation Update
Description
This PR introduces a new twitter_timeline liquid tag. See #7605
Related Tickets & Documents
Closes #7605
QA Instructions, Screenshots, Recordings
- Go to /new
- Create article with following content:
{% twitter_timeline https://twitter.com/FreyaHolmer/timelines/1215413954505297922 %}
- Click 'Preview'
- Click 'Save'.
Added tests?
- [x] yes
- [ ] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [ ] docs.forem.com
- [ ] readme
- [ ] no documentation needed
API: Endpoint to get an organization's details #10931
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
This would provide an api show endpoint dev.to/api/organizations/{org_username}
to search organizations by their username.
As discussed in issue 9212, This is the first of 4 related endpoints that will include:
dev.to/api/organizations/{org_username}/users
dev.to/api/organizations/{org_username}/articles
dev.to/api/organizations/{org_username}/listings
Related Tickets & Documents
https://github.com/forem/forem/issues/9212
Added tests?
- [x] yes
- [ ] no, because they aren't needed
- [ ] no, because I need help
Added to documentation?
- [x] docs.forem.com
- [ ] readme
- [ ] no documentation needed
Fix: Change static color to theme variable #11179
What type of PR is this? (check all applicable)
- [x] Bug Fix
Description
In the integrations page some colors are statics, so doesn't change with the theme, that's make some colors doesn't match with the theme and text color.
Related Tickets & Documents
Fixes #11052
QA Instructions, Screenshots, Recordings
Check if the integrations page show colors relationated with the theme with hover and at select a github project.
Mobile
Bumped minSdkVersion to 21 #104
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Documentation Update
Description
The minSdkVersion has been bumped to 21 from 18.
No further code changes appear to be necessary.
Related Tickets & Documents
#88 - Bump the project minimum SDK API
Overall, we have had over 75 PRs merged during Hacktoberfest. 😍
Thanks again for improving both Forem and the broader open source community by participating in Hacktoberfest. Happy coding!
Top comments (0)