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

current update is saved when new log is created #88

Merged
merged 17 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
182 changes: 182 additions & 0 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "1.0.0",
"repository": "https://github.com/FormidableLabs/figlog.git",
"devDependencies": {
"@figma/plugin-typings": "*",
"@figma/widget-typings": "*",
"@figma/plugin-typings": "^1.92.0",
"@figma/widget-typings": "^1.9.1",
"date-fns": "^3.6.0",
"esbuild": "*",
"prettier": "3.2.5",
Expand Down
4 changes: 2 additions & 2 deletions widget-src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Button = ({ label, hideLabel = false, action, iconSrc, error = fals
fill={COLOR.white}
cornerRadius={RADIUS.sm}
overflow="visible"
spacing={GAP.sm}
spacing={GAP.xs}
padding={PADDING.xs}
stroke={COLOR.red}
strokeWidth={SPACE.one}
Expand Down Expand Up @@ -72,7 +72,7 @@ export const Button = ({ label, hideLabel = false, action, iconSrc, error = fals
onClick={() => {
action();
}}
spacing={GAP.sm}
spacing={GAP.xs}
padding={PADDING.xs}
horizontalAlignItems="center"
verticalAlignItems="center"
Expand Down
6 changes: 3 additions & 3 deletions widget-src/components/ChangeLogEmpty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ChangeLogEmpty = ({ isLocked }: { isLocked: boolean }) => (
fill={COLOR.white}
overflow="visible"
direction="vertical"
spacing={GAP.md}
spacing={GAP.sm}
padding={{
vertical: PADDING.xxl * 2,
horizontal: PADDING.none,
Expand Down Expand Up @@ -58,8 +58,8 @@ export const ChangeLogEmpty = ({ isLocked }: { isLocked: boolean }) => (
x={570}
y={-4}
positioning="absolute"
height={SPACE.md}
width={SPACE.lg}
height={SPACE.lg}
width={SPACE.xl}
src={<HelpArrow />}
/>
</>
Expand Down
14 changes: 8 additions & 6 deletions widget-src/components/ChangeLogRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ChangeLogEditing } from './log/LogEditing';
import { ChangeLogDisplay } from './log/LogDisplay';

const { widget } = figma;
const { AutoLayout, Rectangle } = widget;
const { AutoLayout, Line } = widget;

interface ChangeLogRowProps {
changeLogId: string;
Expand Down Expand Up @@ -43,12 +43,13 @@ export const ChangeLogRow = ({
direction="vertical"
width="fill-parent"
>
<AutoLayout name="Wrapper" overflow="visible" spacing={GAP.md} width="fill-parent">
<AutoLayout name="Wrapper" overflow="visible" spacing={GAP.sm} width="fill-parent">
<User
userName={changeLog.user?.name}
userPhotoUrl={changeLog.user?.photoUrl}
showAvatars={showAvatars}
isLastRow={isLastRow}
isFocused={!!changeLog.state?.editing && !locked}
/>
{!!changeLog.state?.editing && !locked ? (
<ChangeLogEditing
Expand All @@ -72,13 +73,14 @@ export const ChangeLogRow = ({
/>
)}
</AutoLayout>
<Rectangle
<Line
name="Divider"
hidden={isLastRow}
stroke={COLOR.grey}
width="fill-parent"
height={SPACE.one}
strokeDashPattern={[GAP.sm, GAP.sm]}
length="fill-parent"
strokeDashPattern={[SPACE.xxxs, SPACE.xxxs]}
strokeCap="round"
strokeWidth={SPACE.one}
/>
</AutoLayout>
);
Expand Down
21 changes: 14 additions & 7 deletions widget-src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LogoFigLog } from '../svgs/LogoFigLog';
import { LogoNearform } from '../svgs/LogoNearform';
import { COLOR, GAP, FONT, SPACE, PADDING } from '../utilities/Styles';
import { COLOR, GAP, FONT, RADIUS, SPACE, PADDING } from '../utilities/Styles';

const { widget, openExternal } = figma;
const { AutoLayout, Rectangle, SVG, Text } = widget;
Expand All @@ -10,23 +10,30 @@ export const Footer = () => (
name="Footer"
overflow="visible"
direction="vertical"
spacing={PADDING.xl}
spacing={GAP.lg}
width="fill-parent"
padding={{ top: PADDING.xl }}
>
<Rectangle name="Divider" fill={COLOR.greyDark} strokeAlign="outside" width="fill-parent" height={SPACE.one} />
<Rectangle
name="Divider"
fill={COLOR.greyDark}
strokeAlign="outside"
width="fill-parent"
height={SPACE.one}
cornerRadius={RADIUS.md}
/>
<AutoLayout name="Row" overflow="visible" spacing="auto" width="fill-parent" verticalAlignItems="center">
<AutoLayout
name="FigLog Logo"
overflow="visible"
spacing={GAP.md}
spacing={GAP.sm}
verticalAlignItems="center"
onClick={() => {
openExternal('https://commerce.nearform.com/open-source/');
}}
>
<SVG name="FigLog Logo" height={PADDING.xxl} width={PADDING.xxl} src={LogoFigLog} />
<AutoLayout name="FigLog Logo Text" spacing={GAP.sm}>
<SVG name="FigLog Logo" height={32} width={32} src={LogoFigLog} />
<AutoLayout name="FigLog Logo Text" spacing={GAP.xs}>
<Text
fontFamily={FONT.family}
fill={COLOR.black}
Expand All @@ -50,7 +57,7 @@ export const Footer = () => (
<AutoLayout
name="Nearform_Commerce Logo"
overflow="visible"
spacing={GAP.md}
spacing={GAP.sm}
verticalAlignItems="center"
onClick={() => {
openExternal('https://commerce.nearform.com/');
Expand Down
13 changes: 10 additions & 3 deletions widget-src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Status } from './header/Status';
import { Meta } from './header/Meta';
import { Name } from './header/Name';
import { Description } from './header/Description';
import { COLOR, GAP, SPACE } from '../utilities/Styles';
import { COLOR, GAP, RADIUS, SPACE } from '../utilities/Styles';

const { widget } = figma;
const { AutoLayout, Rectangle, useSyncedState } = widget;
Expand Down Expand Up @@ -38,7 +38,7 @@ export const Header = ({
const [descriptionText, setDescriptionText] = useSyncedState('descriptionText', '');

return (
<AutoLayout name="Header" overflow="visible" direction="vertical" spacing={GAP.md} width="fill-parent">
<AutoLayout name="Header" overflow="visible" direction="vertical" spacing={GAP.sm} width="fill-parent">
<AutoLayout name="Container" overflow="visible" direction="vertical" width="fill-parent">
{/* STATUS */}
{status !== '0' && <Status status={status} />}
Expand Down Expand Up @@ -74,7 +74,14 @@ export const Header = ({
locked={isLocked}
/>
</AutoLayout>
<Rectangle name="Divider" fill={COLOR.greyDark} strokeAlign="outside" width="fill-parent" height={SPACE.one} />
<Rectangle
name="Divider"
fill={COLOR.greyDark}
strokeAlign="outside"
width="fill-parent"
height={SPACE.one}
cornerRadius={RADIUS.md}
/>
</AutoLayout>
);
};
Loading
Loading