Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

refactor(comments): create/update/reply with new editor workflow#1170

Merged
mydearxym merged 20 commits intodevfromcomment-rich-editor
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
20 commits
Select commitHold shift + click to select a range
bb37037
refactor(comment-editor): wip
mydearxymOct 18, 2021
3893214
refactor(comment-editor): re-org wip
mydearxymOct 18, 2021
744c224
refactor(comment-editor): re-org wip
mydearxymOct 18, 2021
26a9d77
refactor(comment-editor): re-org & ssr cookie logic
mydearxymOct 19, 2021
0d0ca60
refactor(comment-editor): publish workflow done & style dajust
mydearxymOct 19, 2021
194f37d
refactor(update): put isAuthorUptoved into workflow
mydearxymOct 19, 2021
b882220
refactor(comment-editor): update logic wip
mydearxymOct 19, 2021
c00811e
refactor(comment-editor): update logic done
mydearxymOct 20, 2021
2f02622
refactor(comment-editor): show action when hover
mydearxymOct 20, 2021
051d415
refactor(comment-editor): reply, update, create workflow done
mydearxymOct 20, 2021
501533f
refactor(comment-editor): re-org update method
mydearxymOct 20, 2021
b4a2df2
refactor: re-org all editor to Editor
mydearxymOct 20, 2021
3e08ccc
refactor(comment-list): replies states debug
mydearxymOct 20, 2021
1832229
refactor(comment-list): replies logic & upvote style
mydearxymOct 20, 2021
f10fb9f
refactor(comment-list): replies pagi logic
mydearxymOct 20, 2021
9272298
refactor(comment-list): remove tobeDelete concept
mydearxymOct 21, 2021
9dc6a5b
refactor(comment-list): pagi logic & adjust style
mydearxymOct 21, 2021
9555b12
refactor(comment-list): wip
mydearxymOct 21, 2021
72831ca
refactor(comment-list): adjust upvote & indent-line size/margin
mydearxymOct 21, 2021
9c6bedb
refactor(comments): new comment state api
mydearxymOct 21, 2021
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
56 changes: 44 additions & 12 deletionspackage-lock.json
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

4 changes: 2 additions & 2 deletionspackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,7 +41,7 @@
},
"dependencies": {
"@babel/core": "^7.13.14",
"@groupher/react-editor": "^1.1.28",
"@groupher/react-editor": "^1.1.29",
"@next/bundle-analyzer": "^9.4.4",
"@sentry/browser": "5.17.0",
"@sentry/node": "5.17.0",
Expand All@@ -56,14 +56,14 @@
"chalk": "^2.4.1",
"compatible-debug": "^1.0.0",
"cookie-parser": "^1.4.4",
"cookies-next": "^2.0.3",
"core-js": "3.6.5",
"cross-env": "^7.0.2",
"express": "^4.16.4",
"glob": "^7.1.2",
"graphql": "^15.5.1",
"graphql-request": "3.5.0",
"graphql-voyager": "^1.0.0-rc.31",
"js-cookie": "^2.2.0",
"mastani-codehighlight": "0.0.7",
"mobx": "6.3.2",
"mobx-react": "7.2.0",
Expand Down
1 change: 0 additions & 1 deletionserver/helper.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,6 @@ const renderAndCache = ({ req, res, path }) => {
// do not cache in dev mode
if (dev) {
const pagePath = path || req.path
console.log('# pagePath: ', pagePath)
return app.render(req, res, pagePath, {
...req.query,
...req.params,
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/AnimatedCount/AnimatedCount.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,7 +13,7 @@ const AnimatedCount: FC<TProps> = ({
active = false,
}) => {
return (
<Wrapper size={size} $active={active}>
<Wrapper size={size} $active={active} count={count}>
<AnimateOnChange
animationIn="fadeInUp"
animationOut="bounceOut"
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/AnimatedCount/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ const AnimatedCount = dynamic(() => import('./AnimatedCount'), {
active: boolean
}
return (
<Wrapper size={size} $active={active}>
<Wrapper size={size} $active={active} count={count}>
{count}
</Wrapper>
)
Expand Down
8 changes: 3 additions & 5 deletionssrc/components/AnimatedCount/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
import styled from 'styled-components'

import type { TSIZE, TActive } from '@/spec'
import { theme } from '@/utils/themes'

import { getFontSize } from './metric'
import { getFontSize, getCountColor } from './metric'

type TWrapper = { size: TSIZE } & TActive
type TWrapper = { size: TSIZE; count: number } & TActive

export const Wrapper = styled.div<TWrapper>`
color: ${({ $active }) =>
$active ? '#139C9E' : theme('thread.articleTitle')};
color: ${({ $active, count }) => getCountColor($active, count)};
font-size: ${({ size }) => getFontSize(size)};
font-weight: ${({ $active }) => ($active ? 'bold' : 'normal')};
overflow-y: hidden;
Expand Down
10 changes: 9 additions & 1 deletionsrc/components/AnimatedCount/styles/metric.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
import type { TSIZE } from '@/spec'
import { SIZE } from '@/constant'

import { theme } from '@/utils/themes'

export const getFontSize = (size: TSIZE): string => {
switch (size) {
case SIZE.TINY: {
Expand All@@ -15,4 +17,10 @@ export const getFontSize = (size: TSIZE): string => {
}
}

export const holder = 1
export const getCountColor = ($active: boolean, count: number): string => {
if ($active) return '#139C9E'
if (count === 0) return '#4f7478'
if (count >= 5) return theme('thread.articleTitle')

return theme('thread.articleDigest')
}
2 changes: 1 addition & 1 deletionsrc/components/ArtimentBody/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,7 @@ const ArtimentBody: FC<TProps> = ({

return (
<Wrapper testid={testid}>
<Body ref={bodyRef} lineClampNum={lineClampNum}>
<Body ref={bodyRef} lineClampNum={lineClampNum} mode={mode}>
<HTML
dangerouslySetInnerHTML={{
__html: document.bodyHtml,
Expand Down
5 changes: 3 additions & 2 deletionssrc/components/ArtimentBody/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,8 +8,9 @@ export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
'data-test-id': testid,
}))<TTestable>``

export const Body = styled.div<{ lineClampNum: number }>`
font-size: 16px;
type TBody = { lineClampNum: number; mode: 'article' | 'comment' }
export const Body = styled.div<TBody>`
font-size: ${({ mode }) => (mode === 'article' ? '16px' : '15px')};
line-height: 1.85;
position: relative;
display: -webkit-box;
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/Buttons/SubmitButton.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,7 +33,7 @@ const SubmitButton: FC<TProps> = ({
{publishDone ? (
<DonwWrapper>
<DoneIcon />
<DoneHint>已完成</DoneHint>
<DoneHint>已提交</DoneHint>
</DonwWrapper>
) : (
<YesOrNoButtons
Expand Down
69 changes: 0 additions & 69 deletionssrc/components/ContentSourceCard/DesktopView.js
View file
Open in desktop

This file was deleted.

Loading

[8]ページ先頭

©2009-2025 Movatter.jp