-
Notifications
You must be signed in to change notification settings - Fork 0
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
Antti/modal #2
Antti/modal #2
Conversation
…ibute to SVG elements"
…el buttons changes color when mouse is on the element
…r is on the accept button
… index.tsx from Modal.tsx
…nged DeleteModal to appear only once when opened in index.tsxinstead of number of gifts
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Näköjään tuo TODO.md tuli mukana, vaikka laitoin sen .gitignore-tiedostoon. Eipä siinä mitään salaista ole 😄 Committin tekstejä ei taida pystyä enää jälkikäteen muuttamaan? Huomasin, että olin huonosti laittanut tuon yhden commitin "Changed AcceptDeclineModal to DeleteModal". Kysessä oli .tsx-tiedoston nimen vaihtaminen, tuosta ainakin itse saan käsityksen, että ainoastaan komponentin nimi vaihtui |
…ng packages in antti/modal branch
…cline buttons to *_button-icon.svg. Created React components from SVG images
…anged styling of the buttons a bit
Luultavasti lisäsit sen committiin mukaan ennen kuin muokkasit .gitignorea.
|
Toistaiseksi ei. Sitten jos myöhemmin tulee tarve toiselle vastaavalle, niin voi miettiä siirtääkö joitakin osia DeleteModal:ista yhteiseen ConfirmModal tms. komponenttiin. Mutta yleensä ei kannata kovin paljon tehdä etukäteen vaan vasta kun tarve tulee.
Onko tämä ihan okei, vai pitäisikö tuosta tehdä "globaali" vaihtamalla esim
Ei kannata, nykyinen hakemistorakenne on hyvä.
Hmm, onkohan sulla jäänyt pushaamatta jotain? Ainakaan repossa olevassa versiossa tyylejä ei voi antaa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alla joitakin kommentteja. Tuo antti/modal_github-action-error-fix minkä meinasit toisessa PR:ssä mergetä lokaalisti taitaa olla vielä pushaama repoon?
components/DeleteModal.tsx
Outdated
{dataToDeleteInfo} | ||
</p> | ||
<AcceptButtonSVG | ||
alt="acceptButton" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alt-tekstin on tarkoitus korvata kuva jos kuvaa ei jostain syystä voi näyttää (nettiongelma, näkövammaiset), joten Parempi teksti tähän olisi ihmisen luettavaksi tehty esim. "Accept deletion".
components/DeleteModal.tsx
Outdated
} | ||
/> | ||
<DeclineButtonSVG | ||
alt="declineButton" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tämä teksti voisi olla esim "Cancel"
Oli jäänyt pushaamatta ja tuo versio, jossa propeilla pystyy antamaan className:lle arvoja onkin tehty tuonne antti/json-server -branchiin. Katson tuon vaikka Merge-vaiheessa, että onko tarpeellinen, luulen että ei. |
…r undefined values
type AcceptButtonType = SVGProps<SVGSVGElement> & { | ||
backgroundFill?: string; | ||
checkmarkFill?: string; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nyt svgr
:n generoimaa koodia on muokattu lisäämällä custom-propit. Sikäli huono, että aina kun ajaa npm run svgr
nuo häviävät ja pitää olla varovainen ettei niitä commitoi. @aleksiasmala olisiko sulla joku idea miten tämä kannattaisi tehdä?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tätä pitää vielä miettiä voisiko jotenkin parantaa, mutta tehdään se myöhemmin.
…components. Changed the way how hovering buttons changes color
…anged the way how gifts' line-through works. Deleted DeleteModalConditionalRendering component. Added couple conditional checks for the DeleteModal render
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nyt näyttää erinomaiselta! Nämä viimeisimmät muutokset selkeyttivät koodia merkittävästi! 👍
Ensimmäinen prototyyppi modalista tehty.