Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2024-02-22 02:12:52 #7389

Merged
merged 84 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
729b339
stripeの古いメソッドを使わないように修正
kyokucho1989 Feb 1, 2024
700585d
Markdownの記法でユーザーアイコンを表示する箇所においてtitle属性を追加
a-kuroki-gs Feb 7, 2024
172eada
title属性を検証するテストを追加
a-kuroki-gs Feb 7, 2024
84f623f
インタビューブロックでユーザーアイコンを表示する箇所においてtitle属性を追加
a-kuroki-gs Feb 7, 2024
c93cd46
インタビューブロック用のテストを追加
a-kuroki-gs Feb 7, 2024
f38e798
「リンク切れを調べてメールを出す」機能の、メール宛先をlokkaに更新した
a-terumoto-gs Feb 8, 2024
fde8195
学習開始時間と終了時間の比較においてto_dateメソッドを用いることで、TimeWithZoneのオブジェクトからDateクラスへ変換す…
a-kuroki-gs Feb 8, 2024
6a1fdec
月を跨いだ日報のテストを追加
a-kuroki-gs Feb 8, 2024
1a25688
develop/test環境においてもDiskサービスへのパブリックアクセスを許可し、ファイルのurlを生成する際の動きを本番環境と合わせる
junohm410 Feb 9, 2024
627b2fe
ユーザー一覧ページの各アクション数をリンクに変更
naokinaokiboo Feb 2, 2024
8b58da5
各アクション数をコンポーネント化
naokinaokiboo Feb 6, 2024
9b7bca0
静的な値であるpropsの書き方を修正
naokinaokiboo Feb 9, 2024
7d8551f
コピー機能実装
kurumadaisuke Feb 11, 2024
95b2430
コピーする内容をcategory_idsに変更
kurumadaisuke Feb 11, 2024
ce25f74
Style/HashSyntaxを10個のファイルに適用
SuzukaHori Feb 6, 2024
27ec4a2
アイコンをコピーアイコンに変更
kurumadaisuke Feb 12, 2024
9ad0625
提出物の確認を取り消しても、プラクティスの進捗ステータスが「修了」のままだったバグを修正
reckyy Feb 7, 2024
8905146
Layout/LineLengthに引っかかったので、対応
reckyy Feb 7, 2024
76636c3
case文内にさらに分岐は良くないと思い変更
reckyy Feb 7, 2024
f914f6f
提出物の確認取り消し後の、学習ステータスが正常に遷移しているかのテスト追加
reckyy Feb 8, 2024
bd8e09a
他のテストに影響が出ていたので、新規で作成するのではなくあるものを利用するように変更
reckyy Feb 9, 2024
afce775
不要なステップを削除
reckyy Feb 12, 2024
e7bfcdf
正しく結果をテストできるように修正
reckyy Feb 12, 2024
d586128
正しくテストできていなかったため変更。
reckyy Feb 13, 2024
d2ebbdc
正しくテストできていなかったため修正
reckyy Feb 14, 2024
73631df
退会完了メールのBCCにinfo@lokka.jpを追加する
yocchan-git Feb 14, 2024
a7c63ad
bccが送れているかテストコードを書く
yocchan-git Feb 14, 2024
2f6942b
「管理ページ」のマークアップをh1に変更
yocchan-git Feb 14, 2024
7ec2957
質問投稿時のタイトル入力の部分に説明を追加
Feb 14, 2024
a405b3e
自動退会メールのBCCにinfo@lokka.jpを追加
Feb 15, 2024
6cee108
article個別ページのogp imageの設定
machida Feb 15, 2024
30af58f
blank画像のパスを修正
machida Feb 15, 2024
cc4572c
テストの順番変更
machida Feb 15, 2024
e0c3696
仕様変更で不要になったテストを削除
machida Feb 15, 2024
29ff872
画像のファイル名変更
machida Feb 15, 2024
9fb9572
Merge pull request #7378 from fjordllc/feature/change-h1-admin-users-…
komagata Feb 15, 2024
9c0bfed
Merge pull request #7377 from fjordllc/feature/add-bcc-to-retire-email
komagata Feb 15, 2024
96088c2
Merge pull request #7323 from fjordllc/feature/apply-rubocop-rule-6
komagata Feb 15, 2024
b146b7b
Merge pull request #7305 from fjordllc/feature/replace-num-of-actions…
komagata Feb 15, 2024
e21a1f7
Merge pull request #7340 from fjordllc/bug/report-learning-times-exte…
komagata Feb 15, 2024
e24e51a
Merge pull request #7337 from fjordllc/feature/update-check-broken-li…
komagata Feb 15, 2024
829f775
Rubocopのルール(Style/HashSyntax)を適用する1
nishitatsu-dev Feb 6, 2024
bd749db
間違えて追加されたと思われるExclude指定を削除
nishitatsu-dev Feb 15, 2024
89fac16
Merge pull request #7346 from fjordllc/chore/allow-users-public-acces…
komagata Feb 15, 2024
d6384db
Merge pull request #7380 from fjordllc/feature/add-bcc-to-auto-retire…
komagata Feb 15, 2024
f95d1d5
Merge pull request #7320 from fjordllc/feature/apply-rubocop-style-ha…
komagata Feb 15, 2024
40eb0c4
card footerのボタンの調整
machida Feb 16, 2024
0b48a04
テストケースの中でデータを用意する形に修正
reckyy Feb 16, 2024
88b8493
「Layout/IndentationConsistency」ルール削除、他コメント追加
a-terumoto-gs Feb 16, 2024
2b4707e
テスト内のサムネイル設定記事と設定していない記事を分けた
machida Feb 17, 2024
25695bc
Merge pull request #7385 from fjordllc/selected_thumbnail_url
machida Feb 17, 2024
1e6f556
はてなブックマークのシェアボタンを設置
Dec 13, 2023
9dab983
Facebookのシェアボタンを設置
Dec 13, 2023
66353b5
Xのシェアボタンを設置。コードを整理。
Dec 13, 2023
28982fb
ブログ記事の下部にもシェアボタンを設置
Dec 13, 2023
9951f3c
テンプレートにarticle.idを渡すのではなく、articleを渡してテンプレート側でarticle.idを使って値を取得するよう修正
Dec 17, 2023
f2cccd1
RuboCop修正
Dec 17, 2023
a3d3b0b
シェアボタンにデザインを入れた
machida Jan 5, 2024
34a8fef
double quotesをsingle quotesに変更
Jan 7, 2024
e317de7
share_buttonsに@article.idを渡すよう修正。ブログ個別ページのURLが正しく表示されないため。
Jan 7, 2024
619fd65
Xのシェアボタンのテストを実装
Jan 7, 2024
7226a72
はてぶのシェアボタンのテストを実装
Jan 7, 2024
5de83b4
Facebookのシェアボタンのテストを実装
Jan 29, 2024
cecdcb4
Xのシェアボタンのテストを修正
Jan 30, 2024
cfd3e1a
はてぶのシェアボタンのテストを修正
Jan 30, 2024
c8aea07
Facebookのシェアボタンのテストを修正
Jan 30, 2024
0f94982
下側のシェアボタンで@article.idを渡すよう修正
Feb 1, 2024
901571f
URLをスリム化。シェアするブログ記事をチェックする。
Feb 7, 2024
1f8ef98
Merge pull request #7354 from fjordllc/feature/course-list-copy
komagata Feb 19, 2024
1330a90
Merge pull request #7300 from fjordllc/feature/collect-the-use-of-old…
komagata Feb 19, 2024
e363aaa
Merge pull request #7326 from fjordllc/bug/status-remains-completed-a…
komagata Feb 19, 2024
908af81
Merge pull request #7376 from fjordllc/feature/add-description-to-que…
komagata Feb 19, 2024
37cc341
テストの一部をDRYなコードに修正
a-kuroki-gs Feb 19, 2024
1f8b21f
#のあとに1スペース追加
a-terumoto-gs Feb 19, 2024
a8f83e5
rubocopのルールから除外されていたファイルを、適用するように
masyuko0222 Feb 5, 2024
4a622cd
Merge pull request #7153 from fjordllc/feature/add-share-buttons-on-b…
komagata Feb 20, 2024
133e15e
Merge pull request #7327 from fjordllc/feature/display-user-name-when…
komagata Feb 20, 2024
cccf454
#前の不要なスペース削除
a-terumoto-gs Feb 20, 2024
4f18d79
コメントだけになったので削除
masyuko0222 Feb 20, 2024
3ad3145
削除したファイルをrubocop.ymlからも削除
masyuko0222 Feb 20, 2024
82bc25e
サブスクリプション作成時に税率を追加するようにした
komagata Feb 20, 2024
9019539
Merge pull request #7415 from fjordllc/chore/add-tax_rate
komagata Feb 20, 2024
d0089b4
Merge pull request #7316 from fjordllc/feature/apply-rubocop-rule-7
komagata Feb 21, 2024
a364995
Merge pull request #7395 from fjordllc/feature/apply-4-slim-lint-rule…
komagata Feb 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ require:
- rubocop-minitest
- rubocop-capybara

inherit_from: .rubocop_todo.yml

inherit_gem:
rubocop-fjord:
- config/rubocop.yml
Expand Down
45 changes: 0 additions & 45 deletions .rubocop_todo.yml

This file was deleted.

2 changes: 1 addition & 1 deletion app/controllers/admin/campaigns_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Admin::CampaignsController < AdminController
def new
start_at = Time.current.beginning_of_day
@campaign = Campaign.new(
start_at: start_at,
start_at:,
end_at: start_at + 7.days - 1.minute,
trial_period: 7
)
Expand Down
14 changes: 7 additions & 7 deletions app/controllers/announcements_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ def new
copy_announcement(params[:id])
elsif params[:page_id]
page = Page.find(params[:page_id])
copy_template_by_resource('page_announcements.yml', page: page)
copy_template_by_resource('page_announcements.yml', page:)
elsif params[:event_id]
event = Event.find(params[:event_id])
copy_template_by_resource('event_announcements.yml', event: event)
copy_template_by_resource('event_announcements.yml', event:)
elsif params[:regular_event_id]
regular_event = RegularEvent.find(params[:regular_event_id])
organizers = regular_event.organizers.map { |organizer| "@#{organizer.login_name}" }.join("\n - ")
holding_cycles = ActiveDecorator::Decorator.instance.decorate(regular_event).holding_cycles
hold_national_holiday = "(祝日#{regular_event.hold_national_holiday ? 'も開催' : 'は休み'})"
copy_template_by_resource('regular_event_announcements.yml',
regular_event: regular_event,
organizers: organizers,
holding_cycles: holding_cycles,
hold_national_holiday: hold_national_holiday)
regular_event:,
organizers:,
holding_cycles:,
hold_national_holiday:)
end
end

Expand Down Expand Up @@ -115,7 +115,7 @@ def copy_announcement(announcement_id)
end

def copy_template_by_resource(template_file, params = {})
template = MessageTemplate.load(template_file, params: params)
template = MessageTemplate.load(template_file, params:)
@announcement.title = template['title']
@announcement.description = template['description']
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/admin/count_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ def show
hibernated_at: nil
).count

render json: { users_count: users_count }
render json: { users_count: }
end
end
4 changes: 2 additions & 2 deletions app/controllers/api/bookmarks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def index

@bookmarks = Bookmark.where(
user: current_user,
bookmarkable: bookmarkable
bookmarkable:
)
end

Expand All @@ -21,7 +21,7 @@ def create
else
@bookmark = Bookmark.create!(
user: current_user,
bookmarkable: bookmarkable
bookmarkable:
)
render status: :created, json: @bookmark
end
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/api/checks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ class API::ChecksController < API::BaseController

def index
@checks = Check.where(
checkable: checkable
checkable:
)
end

def create
if checkable.checks.empty?
@check = Check.create!(
user: current_user,
checkable: checkable
checkable:
)
Newspaper.publish(:check_create, { check: @check })
head :created
Expand All @@ -24,6 +24,8 @@ def create

def destroy
@check = Check.find(params[:id]).destroy
Newspaper.publish(:check_cancel, { check: @check })

head :no_content
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/followings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class API::FollowingsController < API::BaseController
def create
user = User.find(params[:id])
watch = params[:watch] == 'true'
if current_user.follow(user, watch: watch)
if current_user.follow(user, watch:)
render json: { id: user.id }
else
head :bad_request
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/products/unchecked_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def index
.list
.page(params[:page])
end
@products = @products.where(checker_id: checker_id) if checker_id.present?
@products = @products.where(checker_id:) if checker_id.present?
@products_grouped_by_elapsed_days = @products.group_by { |product| product.elapsed_days >= 7 ? 7 : product.elapsed_days }
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/session_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def create
user = User.authenticate(params[:login_name], params[:password])
if user
token = User.issue_token(id: user.id, email: user.email)
render json: { token: token }
render json: { token: }
else
head :bad_request
end
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/api/watches/toggle_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class API::Watches::ToggleController < API::BaseController
def index
@watches = Watch.where(
user: current_user,
watchable: watchable
watchable:
)
end

Expand All @@ -16,11 +16,11 @@ def create
)
if watch_existence
message = "この#{watchable.class.model_name.human}はWatch済です。"
render json: { message: message }, status: :unprocessable_entity
render json: { message: }, status: :unprocessable_entity
else
watch = Watch.create!(
user: current_user,
watchable: watchable
watchable:
)
render json: watch
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def init_user
end

def set_available_emojis
@available_emojis = Reaction.emojis.map { |key, value| { kind: key, value: value } }
@available_emojis = Reaction.emojis.map { |key, value| { kind: key, value: } }
end

def set_host_for_disk_storage
Expand Down
7 changes: 6 additions & 1 deletion app/controllers/mentor/courses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ def index
end

def new
@course = Course.new
if params[:course_id].present?
original_course = Course.find(params[:course_id])
@course = Course.new(category_ids: original_course.category_ids)
else
@course = Course.new
end
end

def edit; end
Expand Down
5 changes: 5 additions & 0 deletions app/helpers/articles_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ def contributor
def thumbnail_blank?(article)
!article.thumbnail.attached? && article.thumbnail_type == 'prepared_thumbnail'
end

def ogp_image_url(image_url)
base_url = "#{request.protocol}#{request.host_with_port}"
base_url + image_url
end
end
20 changes: 20 additions & 0 deletions app/javascript/components/user-activity-count.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template lang="pug">
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| {{ activityName }}
dd.card-counts__item-value(:class='activityCount == 0 ? "is-empty" : ""')
span(v-if='activityCount == 0')
| {{ activityCount }}
a.a-text-link(v-else)(:href='activityUrl')
| {{ activityCount }}
</template>
<script>
export default {
props: {
activityName: { type: Object, required: true },
activityCount: { type: Object, required: true },
activityUrl: { type: Object, required: true }
}
}
</script>
59 changes: 24 additions & 35 deletions app/javascript/components/user-activity-counts.vue
Original file line number Diff line number Diff line change
@@ -1,44 +1,33 @@
<template lang="pug">
.card-counts.is-users.mt-3(v-if='user.student_or_trainee')
dl.card-counts__items
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| 日報
dd.card-counts__item-value(
:class='user.report_count == 0 ? "is-empty" : ""')
| {{ user.report_count }}
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| 提出物
dd.card-counts__item-value(
:class='user.product_count == 0 ? "is-empty" : ""')
| {{ user.product_count }}
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| コメント
dd.card-counts__item-value(
:class='user.comment_count == 0 ? "is-empty" : ""')
| {{ user.comment_count }}
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| 質問
dd.card-counts__item-value(
:class='user.question_count == 0 ? "is-empty" : ""')
| {{ user.question_count }}
.card-counts__item
.card-counts__item-inner
dt.card-counts__item-label
| 回答
dd.card-counts__item-value(
:class='user.answer_count == 0 ? "is-empty" : ""')
| {{ user.answer_count }}
user-activity-count(
activity-name='日報',
:activity-count='user.report_count',
:activity-url='`${user.url}/reports`')
user-activity-count(
activity-name='提出物',
:activity-count='user.product_count',
:activity-url='`${user.url}/products`')
user-activity-count(
activity-name='コメント',
:activity-count='user.comment_count',
:activity-url='`${user.url}/comments`')
user-activity-count(
activity-name='質問',
:activity-count='user.question_count',
:activity-url='`${user.url}/questions`')
user-activity-count(
activity-name='回答',
:activity-count='user.answer_count',
:activity-url='`${user.url}/answers`')
</template>
<script>
import UserActivityCount from './user-activity-count.vue'
export default {
components: {
'user-activity-count': UserActivityCount
},
props: {
user: { type: Object, required: true }
}
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/markdown-it-container-speak.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default (md) => {
return `<div class="speak">
<div class="speak__speaker">
<a href="/users/${speakerName}" class="a-user-emoji-link">
<img class="js-user-icon a-user-emoji" data-user="${speakerName}">
<img title="@${speakerName}" class="js-user-icon a-user-emoji" data-user="${speakerName}">
<spanv class="speak__speaker-name">${speakerName}</span>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/markdown-it-user-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export default MarkdownItRegexp(
/:@(?!mentor:)([a-zA-Z0-9_-]+):/,

(match) => {
return `<a href="/users/${match[1]}" class="a-user-emoji-link"><img class="js-user-icon a-user-emoji" data-user="${match[1]}" width="40" height="40"></a>`
return `<a href="/users/${match[1]}" class="a-user-emoji-link"><img title="@${match[1]}" class="js-user-icon a-user-emoji" data-user="${match[1]}" width="40" height="40"></a>`
}
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.card-footer
container: card-footer / inline-size
+media-breakpoint-up(md)
padding: .5rem 1.25rem
padding: .5rem 1rem
min-height: 3rem
+media-breakpoint-down(sm)
padding: .5rem .75rem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
.card-main-actions__items
display: flex
gap: .75rem
+media-breakpoint-up(md)
@container card-footer (min-width: 20em)
+position(relative)
justify-content: center
flex-wrap: wrap
align-items: flex-end
min-height: 1.875rem
+media-breakpoint-down(sm)
@container card-footer (max-width: 19.9375em)
flex-direction: column
&.is-sub-actions
justify-content: flex-end
+media-breakpoint-down(sm)
@container card-footer (max-width: 19.9375em)
flex-direction: row
.card-main-actions__item.is-sub
position: static
flex: 0 0 auto

.card-main-actions__item
+media-breakpoint-up(md)
flex: 0 0 12rem
max-width: calc(50% - .375rem)
@container card-footer (min-width: 20em)
flex: 1
max-width: 15rem
&.is-sub
+position(absolute, right 0, bottom 0)
+media-breakpoint-down(sm)
@container card-footer (max-width: 19.9375em)
flex-basis: 100%
max-width: 100%
&.is-sub
Expand All @@ -37,6 +37,10 @@
&.is-end
margin-left: auto
flex-basis: 2.5rem
.card-main-actions.is-3-items &
@container card-footer (min-width: 20em)
flex: 1 0 0


.card-main-actions__muted-action
+hover-link-reversal
Expand Down
Loading
Loading