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-11-07 07:17:18 +0000 #8165

Merged
merged 38 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0b31567
ルーティングの追加
masyuko0222 Oct 22, 2024
322438b
APIの実装
masyuko0222 Oct 22, 2024
044897d
テストデータを削除した
Ryooo-k Oct 24, 2024
86542b9
Fix a typo (HEADFULL -> HEADFUL)
cafedomancer Oct 27, 2024
bf3e726
ブラウザのタブのタイトルとページの種類が一致しないのを修正
hagiya0121 Oct 25, 2024
6d063e0
テストが通るようにメタタグのtitleを設定
hagiya0121 Oct 27, 2024
9a4961b
Bump rexml from 3.3.6 to 3.3.9
dependabot[bot] Oct 28, 2024
7a29d98
タイトル表示を仕様に合わせる
hagiya0121 Oct 29, 2024
5272ed8
インデントを調整
hagiya0121 Oct 29, 2024
200427d
Merge pull request #8148 from fjordllc/feature/add_reading_circles_api
komagata Oct 30, 2024
4d8b44b
名前が長いユーザーがいても、メンターダッシュボードの経過日数カラムのレイアウトを崩れなくさせた
machida Oct 30, 2024
c1ebfd5
広いディスプレイでもユーザー一覧を見やすくした
machida Oct 30, 2024
29600fc
Bump elliptic from 6.5.7 to 6.6.0
dependabot[bot] Oct 31, 2024
6a01128
Merge pull request #8168 from fjordllc/dependabot/npm_and_yarn/ellipt…
komagata Oct 31, 2024
a59d02e
Merge pull request #8162 from fjordllc/dependabot/bundler/rexml-3.3.9
komagata Oct 31, 2024
fc5931c
定期イベント参加者一覧のアイコン横に「削除する」リンクを追加
ayu-0505 Oct 8, 2024
60848b6
参加者削除を参加者本人とメンターのみができるようにコントローラーを変更
ayu-0505 Oct 8, 2024
d733f29
コントローラー内のインスタンス変数をローカル変数に変更(viewに渡さないため)
ayu-0505 Oct 8, 2024
3df12bb
destroyアクションにて後置きifをガード節に変更、_participation.html.slimでuser_idを送信するよう変更
ayu-0505 Oct 9, 2024
92acfc9
テストにおいて削除リンクを2箇所感知していたのを、指定するように変更
ayu-0505 Oct 9, 2024
dca3a75
実装方法を早期リターンから条件分岐に変更
ayu-0505 Oct 11, 2024
75f438b
正常系テストを追加(メンターによる参加者削除)
ayu-0505 Oct 11, 2024
4d2dbe3
余分なクラス指定を削除
ayu-0505 Oct 11, 2024
585096c
削除ができるのはメンターから管理者に変更し、削除リンクにデザインを入れた
machida Oct 15, 2024
69144d3
adminでログインしたときだけ、削除リンクを表示するようにした
machida Oct 15, 2024
100f1d9
リンクのインデントずれを修正
machida Oct 16, 2024
7fdc51a
コードの1行が長くなっていたので改行を追加
ayu-0505 Nov 1, 2024
445ca8c
Merge pull request #8129 from fjordllc/feature/mentor_can_remove_othe…
komagata Nov 1, 2024
cfb5c2d
Merge pull request #8150 from fjordllc/bug/daily-report-congratulator…
komagata Nov 1, 2024
6d287a4
Merge pull request #8157 from fjordllc/headfull-to-headful
komagata Nov 2, 2024
b89d0d5
研修生表示のデザイン崩れ修正
machida Nov 3, 2024
f346b7a
Merge pull request #8156 from fjordllc/bug/fix-tab-title
komagata Nov 4, 2024
eecb1a2
クラス名変更の反映
machida Nov 5, 2024
b88cb22
GitHubの草をuser個別ページに表示
machida Nov 5, 2024
38a4a59
未ログインページのボタンのズレを修正
machida Nov 7, 2024
7bc254b
:cop:
machida Nov 7, 2024
063df23
Merge pull request #8178 from fjordllc/sm-bugs
machida Nov 7, 2024
e925480
Merge pull request #8177 from fjordllc/fix-column-layouts
machida Nov 7, 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
4 changes: 1 addition & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.3.6)
strscan
rexml (3.3.9)
rollbar (3.5.2)
rss (0.3.0)
rexml
Expand Down Expand Up @@ -536,7 +535,6 @@ GEM
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
stripe (10.1.0)
strscan (3.1.0)
syntax_suggest (1.1.0)
temple (0.10.3)
thor (1.3.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ rails test:all
### 普通のブラウザーでテスト

```
$ HEADFULL=1 rails test:all
$ HEADFUL=1 rails test:all
```

### 並列実行せずにテスト
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| ニコニコカレンダー
hr.a-border-tint
.card-body
.card__description
.card-body__description
.niconico-calendar-nav
- if prev_month?(current_date)
= link_to prev_month_path do
Expand Down
9 changes: 9 additions & 0 deletions app/controllers/api/reading_circles_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

class API::ReadingCirclesController < API::BaseController
def index
@reading_circles = RegularEvent.category_reading_circle
.where(wip: false)
.order(updated_at: :desc, id: :desc)
end
end
7 changes: 6 additions & 1 deletion app/controllers/regular_events/participations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ def create
end

def destroy
@regular_event.cancel_participation(current_user)
if params[:participant_id] && current_user.admin?
user = User.find(params[:participant_id])
@regular_event.cancel_participation(user)
else
@regular_event.cancel_participation(current_user)
end
redirect_to regular_event_path(@regular_event), notice: '参加を取り消しました。'
end

Expand Down
10 changes: 1 addition & 9 deletions app/javascript/components/User.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function User({ user, currentUser }) {
const roleClass = () => `is-${user.primary_role}`

return (
<div className="col-xxl-3 col-xl-4 col-lg-4 col-md-6 col-xs-12">
<div className="col-xxxl-2 col-xxl-3 col-xl-4 col-lg-4 col-md-6 col-xs-12">
<div className="users-item is-react">
<div className={`users-item__inner a-card ${roleClass()}`}>
{currentUser &&
Expand Down Expand Up @@ -70,14 +70,6 @@ export default function User({ user, currentUser }) {
<div className="card-list-item__row">
<div className="card-list-item-title">
<div className="card-list-item-title__end">
{user.company && user.company.logo_url && (
<a href={user.company.url}>
<img
className="user-item__company-logo"
src={user.company.logo_url}
/>
</a>
)}
<a
className="card-list-item-title__title is-lg a-text-link"
href={user.url}>
Expand Down
8 changes: 8 additions & 0 deletions app/javascript/components/UserSns.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export default function UserSns({ user }) {
)}
</li>
</ul>
{user.company && user.company.logo_url && (
<a href={user.company.url}>
<img
className="user-item__company-logo"
src={user.company.logo_url}
/>
</a>
)}
</div>
)
}
3 changes: 3 additions & 0 deletions app/javascript/components/user-sns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
i.fa-solid.fa-clock
.sns-links__item-link.a-button.is-sm.is-disabled.is-icon(v-else)
i.fa-solid.fa-clock

a(v-if='user.company && user.company.logo_url', :href='user.company.url')
img.user-item__company-logo(:src='user.company.logo_url')
</template>
<script>
export default {
Expand Down
4 changes: 0 additions & 4 deletions app/javascript/components/user.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
.a-meta__icon
i.fa-brands.fa-discord
| {{ user.discord_profile.account_name }}
a(
v-if='user.company && user.company.logo_url',
:href='user.company.url')
img.user-item__company-logo(:src='user.company.logo_url')
user-sns(:user='user')
user-activity-counts(:user='user')
.users-item__body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
.dashboard-contents__col
width: 100%
&.is-sub
+media-breakpoint-up(lg)
max-width: 20rem
+media-breakpoint-up(md)
max-width: 20rem
+media-breakpoint-up(sm)
flex: 1
&.is-main
flex: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.sns-links
margin-top: .5rem
display: flex
gap: 1rem
align-items: center
justify-content: space-between

.sns-links__items
+media-breakpoint-down(xs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
.users-item__header-end
flex: 1

.users-item__icon
+media-breakpoint-up(md)
min-width: 3.5rem
+media-breakpoint-down(sm)
min-width: 2.5rem

.users-item__user-icon-image
background-color: var(--base)
+media-breakpoint-up(md)
Expand Down Expand Up @@ -65,12 +71,11 @@

.user-item__company-logo
+size(3rem)
min-width: 3rem
object-fit: cover
background-color: var(--base)
border-radius: .25rem
border: solid 1px var(--border-tint)
float: right
margin-left: .5rem

.users-item__footer
position: relative
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/stylesheets/not-logged-in/_join-us-nav.sass
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

.join-us-nav__item
width: 100%
display: flex
justify-content: center
&.is-main
.join-us-nav__item-link
width: 22.5rem
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/stylesheets/shared/blocks/_footprints.sass
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
.user-icons-item
display: flex
align-items: center
gap: .25rem

.user-icons-item__delete
+text-block(.75rem 1.4)

.user-icons__more
+text-block(.8125rem 1.4, block nowrap)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
json.(reading_circle, :id, :title, :finished, :updated_at)
1 change: 1 addition & 0 deletions app/views/api/reading_circles/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
json.reading_circles @reading_circles, partial: "api/reading_circles/reading_circle", as: :reading_circle
4 changes: 2 additions & 2 deletions app/views/pages/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
- title @page.title
- title "Docs: #{@page.title}"
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」のドキュメント「#{@page.title}」のページです。"
- content_for :extra_body_classes

.page-body
article.unauthorized
= render '/unauthorized/unauthorized_header', label: 'ドキュメント', title: title
= render '/unauthorized/unauthorized_header', label: 'ドキュメント', title: @page.title
.unauthorized__body
.container.is-md
.unauthorized__contents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
= SubmissionAnswer.human_attribute_name :description
hr.a-border
.card-body.is-practice
.card__description
.card-body__description
.a-long-text.is-md.js-markdown-view
= submission_answer.description
4 changes: 2 additions & 2 deletions app/views/practices/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- title @practice.title
- title "プラクティス #{@practice.title}"
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」のプラクティス「#{@practice.title}」のページです。"
- content_for :extra_body_classes

Expand All @@ -10,7 +10,7 @@ ruby:

.page-body
article.unauthorized
= render '/unauthorized/unauthorized_header', label: 'プラクティス', title: title
= render '/unauthorized/unauthorized_header', label: 'プラクティス', title: @practice.title

.unauthorized__body
.container.is-md
Expand Down
10 changes: 6 additions & 4 deletions app/views/questions/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
- title @question.title
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」のQ&A「#{@question.title}」のページです。"
- content_for :extra_body_classes
ruby:
title "Q&A: #{truncate(@question.title, length: 35, omission: '...')}"
set_meta_tags og: { title: "Q&A: #{@question.title}" }
description "オンラインプログラミングスクール「フィヨルドブートキャンプ」のQ&A「#{@question.title}」のページです。"
content_for :extra_body_classes

.page-body
article.unauthorized
= render '/unauthorized/unauthorized_header', label: 'Q&A', title: title
= render '/unauthorized/unauthorized_header', label: 'Q&A', title: @question.title
.unauthorized__body
.container.is-md
.unauthorized__contents
Expand Down
6 changes: 6 additions & 0 deletions app/views/regular_events/_regular_event.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@
= link_to participant do
span class="a-user-role is-#{participant.primary_role}"
= image_tag participant.avatar_url, title: participant.icon_title, class: "a-user-icon is-sm is-#{participant.login_name}", alt: participant.login_name
- if admin_login?
= link_to regular_event_participation_path(regular_event_id: regular_event, participant_id: participant),
class: 'user-icons-item__delete a-text-link is-only-mentor',
method: :delete,
data: { confirm: 'イベントの参加をキャンセルします。よろしいですか?' } do
| 削除する
- else
.o-empty-message
.o-empty-message__icon
Expand Down
2 changes: 1 addition & 1 deletion app/views/reports/_recent_reports.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
= render partial: 'reports/report', collection: @recent_reports, locals: { user_icon_display: false, actions_display: false }
- else
.card-body
.card__description
.card-body__description
.o-empty-message
.o-empty-message__icon
i.fa-regular.fa-sad-tear
Expand Down
2 changes: 1 addition & 1 deletion app/views/reports/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ header.page-header
.o-empty-message
.o-empty-message__icon
.card-list.a-card
.card__description
.card-body__description
.o-empty-message
.o-empty-message__icon
i.fa-regular.fa-sad-tear
Expand Down
2 changes: 0 additions & 2 deletions app/views/unauthorized/_unauthorized_header.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
- title "Q&A: #{truncate(title, length: 35, omission: '...')}"
- set_meta_tags og: { title: "Q&A: #{title}" }
header.unauthorized-header
.container
= image_tag('shared/piyo.svg', alt: 'フィヨルドブートキャンプのキャラクター画像', class: 'unauthorized-header__image')
Expand Down
3 changes: 3 additions & 0 deletions app/views/users/_sns.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@
- else
.sns-links__item-link.a-button.is-sm.is-disabled.is-icon
i.fa-solid.fa-clock
- if user.company&.logo_url
= link_to company_path(user.company) do
img.user-item__company-logo src=user.company.logo_url
5 changes: 1 addition & 4 deletions app/views/users/_user.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.col-xxl-3.col-xl-4.col-lg-4.col-md-6.col-xs-12
.col-xxxl-2.col-xxl-3.col-xl-4.col-lg-4.col-md-6.col-xs-12
.users-item.is-rails
.users-item__inner.a-card
.users-item__inactive-message-container.is-only-mentor
Expand Down Expand Up @@ -46,9 +46,6 @@
.a-meta__icon
i.fa-brands.fa-discord
| #{user.discord_profile.account_name}
- if user.company&.logo_url
= link_to company_path(user.company) do
img.user-item__company-logo src=user.company.logo_url
= render 'users/sns', user: user
- if user.student_or_trainee?
.card-counts.is-users.mt-3
Expand Down
2 changes: 2 additions & 0 deletions app/views/users/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
= react_component 'Grass', { userId: @user.id }, { class: 'a-card' }
- if @user.student_or_trainee?
= render(Calendar::NicoNicoCalendarComponent.new(user: @user, path: :niconico_calendar_date_in_profile_path, current_date: @calendar.current_date, current_calendar: @calendar.with_reports))
- if @user.github_account.present?
= render 'users/github_grass', user: @user
- if @user.completed_practices.present?
- cache [@user, @completed_learnings] do
= render '/users/practices/completed_practices', user: @user, completed_learnings: @completed_learnings
Expand Down
4 changes: 2 additions & 2 deletions app/views/users/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
- title "@#{@user.login_name}"
- title "#{@user.login_name}さんのプロフィール"
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」の@#{@user.login_name}さんのプロフィールページ"
- content_for :extra_body_classes

.page-body
article.unauthorized
= render '/unauthorized/unauthorized_header',
label: 'ユーザープロフィールページ', title: title.to_s
label: 'ユーザープロフィールページ', title: title
.unauthorized__body
.container.is-md
.unauthorized__contents
Expand Down
1 change: 1 addition & 0 deletions config/routes/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@
resources :survey_question_listings, only: %i() do
resource :position, only: %i(update), controller: "survey_question_listings/position"
end
resources :reading_circles, only: %i(index)
end
end
26 changes: 0 additions & 26 deletions db/fixtures/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,29 +338,3 @@ report88:
description: |-
お世話になりました
reported_on: <%= Time.now - 1.month - 1.day %>

# ステージング環境で日報100回目のお祝いメッセージの動作確認が終わり次第、削除します

<% 95.times do |i| %>
report<%= i + 88 %>:
user: komagata
title: <%= "テスト日報 #{i + 4}" %>
description: 動作確認が終わり次第、削除します
reported_on: <%= Time.zone.today - (97 - i) %>
wip: false
emotion: 2
created_at: <%= Time.zone.today - (96 - i).days %>
updated_at: <%= Time.zone.today - (96 - i).days %>
published_at: <%= Time.zone.today - (96 - i).days %>
<% end %>

report184:
user: komagata
title: "テスト日報(下書き) 99"
description: 動作確認が終わり次第、削除します
reported_on: <%= Time.zone.today - 2 %>
wip: true
emotion: 2
created_at: <%= Time.zone.today - 1 %>
updated_at: <%= Time.zone.today - 1 %>
published_at: <%= Time.zone.today - 1 %>
2 changes: 1 addition & 1 deletion test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
include MockEnvHelper
include ArticleHelper

if ENV['HEADFULL']
if ENV['HEADFUL']
driven_by :selenium, using: :chrome
else
driven_by(:selenium, using: :headless_chrome) do |driver_option|
Expand Down
15 changes: 15 additions & 0 deletions test/integration/api/reading_circles_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

require 'test_helper'

class API::ReadingCirclesTest < ActionDispatch::IntegrationTest
test 'GET /api/reading_circles.json' do
get api_reading_circles_path(format: :json)
assert_response :unauthorized

token = create_token('kimura', 'testtest')
get api_reading_circles_path(format: :json),
headers: { 'Authorization' => "Bearer #{token}" }
assert_response :ok
end
end
Loading