Skip to content

Commit b4b4f50

Browse files
authored
Merge branch 'develop' into i18n-translations
2 parents 859ff04 + 01b8e4c commit b4b4f50

File tree

17 files changed

+74
-65
lines changed

17 files changed

+74
-65
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.4.0",
44
"private": true,
55
"dependencies": {
6-
"@appquality/unguess-design-system": "3.1.102",
6+
"@appquality/unguess-design-system": "3.1.104",
77
"@headwayapp/react-widget": "^0.0.4",
88
"@reduxjs/toolkit": "^1.8.0",
99
"@rtk-query/codegen-openapi": "1.2.0",

src/locales/en/translation.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@
253253
"__BUGS_READ_FILTER_ITEM_UNREAD": "Unread",
254254
"__BUGS_REPLICABILITY_FILTER_ITEM_NO_ITEMS": "All replicabilities",
255255
"__BUGS_SEARCH_INPUT_PLACEHOLDER": "Search",
256-
"__BUGS_SEVERITY_FILTER_ITEM_NO_ITEMS": "Typology",
257-
"__BUGS_SEVERITY_FILTER_ITEM_WITH_COUNTER_one": "Typology ({{count}})",
258-
"__BUGS_SEVERITY_FILTER_ITEM_WITH_COUNTER_other": "Typology ({{count}})",
256+
"__BUGS_SEVERITY_FILTER_ITEM_NO_ITEMS": "Severity",
257+
"__BUGS_SEVERITY_FILTER_ITEM_WITH_COUNTER_one": "Severity ({{count}})",
258+
"__BUGS_SEVERITY_FILTER_ITEM_WITH_COUNTER_other": "Severities ({{count}})",
259259
"__BUGS_TABLE_BUG_ID_HEADER_COLUMN": "Bug ID",
260260
"__BUGS_TABLE_DUPLICATE_HEADER_COLUMN": "Duplicates",
261261
"__BUGS_TABLE_DUPLICATE_TOOLTIP_TEXT": "This icon indicates unique bugs",

src/pages/Video/Actions.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ const Actions = () => {
9191
)}
9292
</MetaContainer>
9393
{observations && observations.length ? (
94-
observations &&
9594
observations.map((observation) => (
9695
<Observation
9796
refScroll={refScroll}

src/pages/Video/PageHeader.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,22 @@ const SeveritiesMetaContainer = styled.div`
2424
display: flex;
2525
flex-direction: row;
2626
`;
27-
2827
const SeveritiesMetaText = styled.div`
2928
margin-right: ${({ theme }) => theme.space.sm};
3029
`;
30+
const StyledUseCaseName = styled(MD)`
31+
color: ${({ theme }) => theme.palette.grey[600]};
32+
margin-left: auto;
33+
`;
34+
const StyledPageHeaderMeta = styled(PageHeader.Meta)`
35+
@media (max-width: ${({ theme }) => theme.breakpoints.lg}) {
36+
${StyledUseCaseName} {
37+
display: block;
38+
width: 100%;
39+
margin-top: ${({ theme }) => theme.space.xs};
40+
}
41+
}
42+
`;
3143

3244
const VideoPageHeader = () => {
3345
const { campaignId, videoId } = useParams();
@@ -90,7 +102,7 @@ const VideoPageHeader = () => {
90102
T{video.tester.id} | {video.tester.name}
91103
</Span>
92104
</PageHeader.Description>
93-
<PageHeader.Meta>
105+
<StyledPageHeaderMeta>
94106
{severities && severities.length > 0 && (
95107
<>
96108
<SeveritiesMetaText>
@@ -122,7 +134,11 @@ const VideoPageHeader = () => {
122134
</SeveritiesMetaContainer>
123135
</>
124136
)}
125-
</PageHeader.Meta>
137+
<StyledUseCaseName>
138+
{capitalizeFirstLetter(video.usecase.name)} -{' '}
139+
{capitalizeFirstLetter(video.tester.device.type)}
140+
</StyledUseCaseName>
141+
</StyledPageHeaderMeta>
126142
</PageHeader.Main>
127143
</PageHeader>
128144
</LayoutWrapper>

src/pages/Video/components/Observation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
GetVideosByVidObservationsApiResponse,
1414
} from 'src/features/api';
1515
import { ReactComponent as TagIcon } from 'src/assets/icons/tag-icon.svg';
16-
import { ReactComponent as ShareIcon } from 'src/assets/icons/share-stroke.svg';
16+
import { ReactComponent as LinkIcon } from 'src/assets/icons/link-stroke.svg';
1717
import { useTranslation } from 'react-i18next';
1818
import { useParams } from 'react-router-dom';
1919
import { useCallback, useEffect, useState } from 'react';
@@ -209,7 +209,7 @@ const Observation = ({
209209
copyLink(`observation-${observation.id}`, event)
210210
}
211211
>
212-
<ShareIcon />
212+
<LinkIcon />
213213
</IconButton>
214214
</Tooltip>
215215
</Container>

src/pages/Video/components/ObservationForm.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,19 @@ const ObservationForm = ({
150150

151151
function generateQuotes() {
152152
if (!paragraphs) return undefined;
153-
return paragraphs
153+
const wordsWithinRange = paragraphs
154154
.flatMap((paragraph) =>
155155
paragraph.words.filter(
156-
(w) => w.start >= observation.start && w.end <= observation.end
156+
(word) =>
157+
Number(word.start.toFixed(8)) >=
158+
Number(observation.start.toFixed(8)) &&
159+
Number(word.end.toFixed(8)) <= Number(observation.end.toFixed(8))
157160
)
158161
)
159-
.map((w) => w.word)
162+
.map((word) => word.word)
160163
.join(' ');
164+
165+
return wordsWithinRange;
161166
}
162167

163168
const formInitialValues = {

src/pages/Video/components/ObservationTooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export const ObservationTooltip = ({
5959
size="large"
6060
color={color}
6161
onClick={() => {
62-
seekPlayer?.(start);
6362
setOpenAccordion({ id: observationId });
63+
seekPlayer?.(start);
6464
}}
6565
isSelecting={isSelecting}
6666
>

src/pages/Video/components/Player.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const PlayerContainer = styled.div<{
2929
width: 100%;
3030
height: 55vh;
3131
display: flex;
32-
position: sticky;
32+
position: relative;
3333
top: 0;
34-
z-index: 101;
34+
z-index: 3;
3535
3636
${({ isFetching }) =>
3737
isFetching &&
@@ -52,7 +52,7 @@ const CorePlayer = ({ video }: { video: GetVideosByVidApiResponse }) => {
5252
const [postVideoByVidObservations] = usePostVideosByVidObservationsMutation();
5353
const [patchObservation] = usePatchVideosByVidObservationsAndOidMutation();
5454
const [start, setStart] = useState<number | undefined>(undefined);
55-
const { context, setIsPlaying } = usePlayerContext();
55+
const { context } = usePlayerContext();
5656
const { currentTime } = context.player || { currentTime: 0 };
5757
const { addToast } = useToast();
5858

@@ -127,8 +127,6 @@ const CorePlayer = ({ video }: { video: GetVideosByVidApiResponse }) => {
127127
(time: number) => {
128128
if (videoRef && videoRef.current) {
129129
videoRef.current.currentTime = time;
130-
setIsPlaying(true);
131-
videoRef.current.play();
132130
}
133131
},
134132
[videoRef]
@@ -159,8 +157,8 @@ const CorePlayer = ({ video }: { video: GetVideosByVidApiResponse }) => {
159157
/>
160158
),
161159
onClick: () => {
162-
seekPlayer(obs.start);
163160
setOpenAccordion({ id: obs.id });
161+
seekPlayer(obs.start);
164162
},
165163
tags: obs.tags,
166164
})),
@@ -188,6 +186,7 @@ const CorePlayer = ({ video }: { video: GetVideosByVidApiResponse }) => {
188186
<PlayerContainer isFetching={isFetchingObservations}>
189187
<PlayerProvider.Core
190188
ref={videoRef}
189+
pipMode="auto"
191190
url={video.streamUrl ?? video.url}
192191
onCutHandler={handleCut}
193192
handleBookmarkUpdate={handleBookmarksUpdate}

src/pages/Video/components/TitleDropdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export const TitleDropdown = ({
137137
)}
138138
</Autocomplete>
139139
</Field>
140-
<Menu style={{ maxHeight: '205px' }}>
140+
<Menu style={{ maxHeight: '200px', maxWidth: '290px' }}>
141141
{matchingOptions && matchingOptions.length ? (
142142
matchingOptions.map((item) => (
143143
<Item key={item.id} value={item}>
@@ -164,7 +164,7 @@ export const TitleDropdown = ({
164164
name: inputValue,
165165
}}
166166
>
167-
<MediaFigure>
167+
<MediaFigure style={{ flexShrink: 0 }}>
168168
<AddIcon />
169169
</MediaFigure>
170170
<MediaBody>

src/pages/Video/components/Transcript.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ const Transcript = ({
111111
const body = {
112112
start: part.from,
113113
end: part.to,
114+
text: part.text,
114115
};
115116
await postVideoByVidObservations({
116117
vid: videoId || '',

0 commit comments

Comments
 (0)