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

Add ui/progress-bar stories #936

Merged
merged 3 commits into from
Jul 27, 2023
Merged

Add ui/progress-bar stories #936

merged 3 commits into from
Jul 27, 2023

Conversation

gitstart-twenty
Copy link
Contributor

@gitstart-twenty gitstart-twenty commented Jul 26, 2023

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
@gitstart-twenty gitstart-twenty self-assigned this Jul 26, 2023
@gitstart-twenty gitstart-twenty changed the title TWNTY-894 - Add ui/progress-bar stories Add ui/progress-bar stories Jul 26, 2023
@gitstart-twenty gitstart-twenty marked this pull request as ready for review July 26, 2023 04:30
Comment on lines 3 to 4
import { CatalogDecorator } from '../../../../../testing/decorators/CatalogDecorator';
import { ComponentDecorator } from '../../../../../testing/decorators/ComponentDecorator';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you can use the alias:

Suggested change
import { CatalogDecorator } from '../../../../../testing/decorators/CatalogDecorator';
import { ComponentDecorator } from '../../../../../testing/decorators/ComponentDecorator';
import { CatalogDecorator } from '~/testing/decorators/CatalogDecorator';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';

Comment on lines 15 to 22
const args = {
duration: 10,
delay: 10,
easing: 'easeInOut',
barHeight: 24,
barColor: 'red',
autoStart: false,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the default duration value is really short and does not look good in storybook (we can't even see the animation because it's really fast), I would suggest that you set args to args: { duration: 10000 } in the meta object so it can be applied to the Default and the Catalog stories at once.
For the other args, I don't think they are needed for the Default story, as they have default values and we want the Default stories to display the component in its default state as much as possible.

Comment on lines 32 to 78
args: {
...args,
autoStart: true,
duration: 10000,
},
argTypes: {
duration: defaultArgTypes,
delay: defaultArgTypes,
easing: defaultArgTypes,
barHeight: defaultArgTypes,
barColor: defaultArgTypes,
autoStart: defaultArgTypes,
},
parameters: {
catalog: [
{
name: 'animations',
values: [
'linear',
'easeIn',
'easeOut',
'easeInOut',
'circIn',
'circOut',
'circInOut',
'backIn',
'backOut',
'backInOut',
'anticipate',
],
props: (easing: string) => ({ easing }),
labels: (animation: string) => `Animation: ${animation}`,
},
{
name: 'delays',
values: [0, 10, 100, 1000],
props: (delay: number) => ({ delay }),
labels: (delay: number) => `Delay: ${delay} ms`,
},
{
name: 'sizes',
values: [10, 20, 30, 40],
props: (barHeight: number) => ({ barHeight }),
labels: (size: number) => `Size: ${size} px`,
},
],
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it wasn't quite clear in the issue what we would like to test or not!
I'm not sure testing all existing easings and delays is really necessary for documentation purposes. Chromatic does not capture animations well either for visual regression.

Testing default vs custom color seems more important for visual regression testing.

Here is what I would suggest testing:

  • animation (autoStart): true vs false (animated vs not animated)
  • colors (barColor): default (undefined) vs one custom value (for instance: "blue")
  • sizes (barHeight): default (undefined) vs one custom value (for instance: 10)

As for the argTypes, we would only need to disable controls for autoStart, barColor and barHeight. The other controls can still be relevant to this story.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @thaisguigon ,
The changes requested have been addressed

gitstart-twenty and others added 2 commits July 26, 2023 20:50
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@charlesBochet charlesBochet merged commit 3b50f59 into main Jul 27, 2023
@charlesBochet charlesBochet deleted the TWNTY-894 branch July 27, 2023 00:53
AdityaPimpalkar pushed a commit to AdityaPimpalkar/twenty that referenced this pull request Aug 3, 2023
* Add ui/progress-bar stories

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Add requested changes

Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
AdityaPimpalkar pushed a commit to AdityaPimpalkar/twenty that referenced this pull request Aug 4, 2023
* Add ui/progress-bar stories

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Add requested changes

Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
AdityaPimpalkar pushed a commit to AdityaPimpalkar/twenty that referenced this pull request Aug 4, 2023
* Add ui/progress-bar stories

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Add requested changes

Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

Add pull request previews (twentyhq#954)

Add ergomake

Co-authored-by: Lucas Vieira <vieiralucas4@gmail.com>

[Do not merge] Try ergomake (twentyhq#958)

* Try ergomake

* Try redeploy

Update double cell input width to be fixed (twentyhq#946)

Fix double cell input width to be fixed

Feat/improve editable cell (twentyhq#959)

* Removed isSomeInputInEditMode

* Removed console.log

* Added a first version of generic cell text

* Removed metadata from entity table  V1

* Fix

* Fix

* Fix

TWNTY-892 - Add ui/title stories (twentyhq#955)

* Add ui/title stories

Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Fix linter issues

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

---------

Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>

Add Timeline End Icon (twentyhq#945)

* -added timeline end icon

* - fixed styledDiv in component

* - fixed icon size

Short variant for filter texts (twentyhq#943)

* - added a short variant for filter labels in the filter bar

* - fixed tests
- moved colon to shortoperand

* - fixed formatting

TWNTY-895 - Add ui/checkmark stories (twentyhq#960)

Add ui/checkmark stories

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

feat: upload profile picture from google (twentyhq#964)

* feat: upload profile picture from google

* fix: only add profile picture if user don't have any

feat: increase upload size limit (twentyhq#962)

eat: create ViewField model (twentyhq#961)

* feat: create ViewField model

- Created ViewField prisma model
- Added ViewField server resolvers for findMany/updateOne
- Added getViewFields/updateViewField graphql queries

Closes twentyhq#849

* chore: update node version in .nvmrc files

feat: implement e2e test for CompanyResolver (twentyhq#944)

* feat: wip e2e server test

* feat: use github action postgres & use infra for local

* feat: company e2e test

* feat: add company e2e test for permissions

* Simplify server e2e test run

* Fix lint

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

Fix server e2e tests on CI twentyhq#1

Fix server e2e tests on CI twentyhq#2

Fix server e2e tests on CI twentyhq#3

Fix server e2e tests on CI twentyhq#4

Fix server e2e tests on CI twentyhq#5

Added generic relation cell (twentyhq#969)

* Added generic relation cell

* Deactivated debug

* Added default warning

* Put back display component

* Removed unused types

fix: 906 edit avatar style (twentyhq#923)

* fix: 906 edit avatar style

* fix: 906 add avatar size enum and mapping for font and height

* fix: 906 remove unused vars

chore: optimize size of front docker image (twentyhq#965)

Enable to drag under New button on pipeline (twentyhq#970)

feat: Add workspace delete feature (twentyhq#896)

* Add workspace delete feature

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add fixes and refactors

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add more fixes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add workspace delete mutation

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Complete v1 of deletion

Co-authored-by: Benjamin Mayanja <vibenjamin6@gmail.com>

* Revert unwanted changes

Co-authored-by: Benjamin Mayanja <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Update debouce import

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Fix server e2e tests on CI twentyhq#3

* Fix server e2e tests on CI twentyhq#4

* Fix server e2e tests on CI twentyhq#5

* Added generic relation cell (twentyhq#969)

* Added generic relation cell

* Deactivated debug

* Added default warning

* Put back display component

* Removed unused types

* fix: 906 edit avatar style (twentyhq#923)

* fix: 906 edit avatar style

* fix: 906 add avatar size enum and mapping for font and height

* fix: 906 remove unused vars

* chore: optimize size of front docker image (twentyhq#965)

* Enable to drag under New button on pipeline (twentyhq#970)

* Add minor fix

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: 310387 <139059022+310387@users.noreply.github.com>
Co-authored-by: Lucas Vieira <vieiralucas4@gmail.com>
Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>

feat: rename comment thread into activity (twentyhq#939)

* feat: rename commentThread into activity server

* feat: rename commentThread into activity front

* feat: migration only create tables

feat: migration only create tables

* Update activities

* fix: rebase partial fix

* fix: all rebase problems and drop activity target alter

* fix: lint

* Update migration

* Update migration

* Fix conflicts

* Fix conflicts

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

Fix storybook tests

fix: front not running properly (twentyhq#971)

docs: add DatePicker and ImageInput stories (twentyhq#980)

Closes twentyhq#979

feat: search activities (twentyhq#972)

feat: I can delete my account easily (twentyhq#977)

* Add support for account deletion

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add more fixes

Co-authored-by: Benjamin Mayanja <vibenjamin6@gmail.com>

* Add more fixes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

Feat/generic editable cell chip (twentyhq#982)

* Added generic relation cell

* Deactivated debug

* Added default warning

* Put back display component

* Removed unused types

* wip

* Renamed to view field

* Use new view field structure to have chip working

* Finished

* Added a temp feature flag

chore: Add ui/modal stories (twentyhq#967)

* Add ui/modal stories

Co-authored-by: Matheus <matheus_benini@hotmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>

* Fix the formatting

Co-authored-by: Benjamin Mayanja <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>

---------

Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>

chore: Add ui/tooltip stories (twentyhq#966)

* Add ui/tooltip stories

Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Fix linting

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

---------

Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>

Various fixes on table, board, tasks (twentyhq#983)

* Misc fixes

* Misc fixes

* Misc fixes

* Fix login

Add profile pictures to people and fix account/workspace deletion (twentyhq#984)

* Fix LinkedIn URL not redirecting to the right url

* add avatars for people and seeds

* Fix delete account/workspace

* Add people picture on other pages

* Change style of delete button

* Revert modal to previous size

* Fix tests

Remove empty values from relation picker (twentyhq#986)

fix: empty name values in SingleEntitySelectBase

Feat/generic editable cell all types (twentyhq#987)

* Added generic relation cell

* Deactivated debug

* Added default warning

* Put back display component

* Removed unused types

* wip

* Renamed to view field

* Use new view field structure to have chip working

* Finished

* Added a temp feature flag

* Added double text chip cell

* Ok

* Finished tables

* Fixed icon size

* Fixed bug on date field

* Use icon index

* Fix

* Fixed naming

* Fix

* removed file from merge

* Fixed tests

* Coverage

Add dueDate and assignee on notes (twentyhq#988)

* Add dueDate and assignee on notes

* Fix tests

* Fix tests

Add fake characters to prevent password managers from filling fields (twentyhq#989)

Add ability to properly cast a string, number, null to an integer (twentyhq#990)

Inbox task 2 (twentyhq#991)

* Add ability to properly cast a string, number, null to an integer

* Adding Tab UI component

* Only trigger chromatic when asked

docs: fix instructions to start projects in the docker setup flow (twentyhq#995)

Fix margin on DeleteModal overlay (twentyhq#998)

* Fix margin on DeleteModal overlay

* Update chromatic ci triggers

* Update chromatic ci triggers

Changes to commands in search window (twentyhq#996)

- changes to commands in search window

style: update deactivated state styles in onboarding button (twentyhq#997)

[952] style: update deactivated state styles in onboarding button

Clean and re-organize post table refactoring (twentyhq#1000)

* Clean and re-organize post table refactoring

* Fix tests

feat: add column resizing (twentyhq#975)

* feat: add column resizing

Closes twentyhq#817

* Use mouse up and down instead of dragging

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

Fix table mock mode (twentyhq#1007)

Add deploy buttons and clean environment variables (twentyhq#974)

* add render.yaml

* Clean environment variables

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

feat: implement user impersonation feature (twentyhq#976)

* feat: wip impersonate user

* feat: add ability to impersonate an user

* fix: remove console.log

* fix: unused import

Scroll to currently softfocus cell (twentyhq#1008)

* - scroll to currently softfocus cell

* - moved useEffect to CellSoftFocus component

Add tasks page (twentyhq#1015)

* Refactor top bar component

* Add task page with tabs

* Add tasks

* Add logic for task status

* Fix isoweek definition

* Enable click on task

* Deduplicate component

* Lint

---------

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>

A few polish on tasks (twentyhq#1023)

A few polishing on tasks

Update chromatic CI trigger

Update chromatic CI trigger

Rename SIGN_IN_PREFILLED env variable

Fix env variables for dev setup (twentyhq#1031)

[server] set local setup as default in .env.example (twentyhq#1045)

In storybook, I see a ButtonIconGroup component (twentyhq#1039)

Add ButtonIconGroup storybook components

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

Move trash icon to the top bar of right drawer (twentyhq#1014)

* Move trash icon to the top bar of right drawer

Co-authored-by: Matheus <matheus_benini@hotmail.com>

* Fix background

Co-authored-by: Matheus <matheus_benini@hotmail.com>

* Refactor the code

Co-authored-by: Matheus <matheus_benini@hotmail.com>

---------

Co-authored-by: Matheus <matheus_benini@hotmail.com>

Fix hotkeys for tasks page (twentyhq#1034)

- fix hotkeys for tasks

Fix twentyhq#1038: Logout button should be change to gray (twentyhq#1052)

feat: persist resized column widths (twentyhq#1017)

* feat: persist resized column widths

Closes twentyhq#981

* test: mock company and person view fields

Closes twentyhq#710: Add the number of opportunities on each stage (twentyhq#1011)

* Add the number of oppurtunities on each stage

* Remove excess css properties in Boardcolumn.tsx and use theme

* Remove padding from oppurnities counters

Sanitize url before fetching favicon and display letter avatar if it can't be retrieved (twentyhq#1035)

* Sanitize url before fetching favicon and display letter avatar if it can't be retrieved

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Priorotise www for apple.com domain

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Fix the tests

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Change avatar generation strategy

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

Fix: positioning of label to rename columns (twentyhq#1051)

Fix positioning of label to rename columns

Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com>

Fix Avatars no centered (twentyhq#1050)

- fix workspace icon now centered
- fix profile avatar now centered

Feat/filter activity inbox (twentyhq#1032)

* Move files

* Add filtering for tasks inbox

* Add filter dropdown for single entity

* Minor

* Fill empty button

* Refine logic for filter dropdown

* remove log

* Fix unwanted change

* Set current user as default filter

* Add avatar on filter

* Improve initialization of assignee filter

* Add story for Tasks page

* Add more stories

* Add sotry with no tasks

* Improve dates

* Enh tests

---------

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>

Refactor: Morph strategy on `PipelineProgress` (twentyhq#1065)

* Deprecate pipelineprogress backref on person to improve naming

* Remove deprecated point of contact fields

* Add company and person entities on pipelineprogress

* Migrate data from old progressable to new entity fields

* Codegen frontend

* Use company Id, deprecate progressableId

* Get rid of deprecated progressableId field

* Remove deprecated progressableType field from pipeline progress

* Remove useless migrations

Improve mouse tracking (twentyhq#1061)

* Improve mouse tracking

* Fix lint

* Fix regression on Filters

* Fix according to review

[PeoplePicker] fix missing avatar in user search dropdown (twentyhq#1069)

Fix pipeline performance issue (twentyhq#1070)

Remove constraint activity morph relations foreign keys

Adding the favorite button

favorites schema

favorite ability handler

favorite module export

front end UI

front end graphql additions

server ability handlers

server resolvers and services

commits squashed and merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ui/progress-bar stories
3 participants