CDL-Workout - Looking for some help with styling this "portfolio project"
Yo!
https://github.com/callum-laing/cdl-workout
I've been messing with this for a few days as the original styling was horrendous (see image for screenshot from my portfolio).
I've changed it to a single column view as I think it works better, especially if diving between Desktop/Mobile (I imagine most usage will be mobile, which is where I use it).
Currently you "Add Workout" to then create a workout day, for me it's something like Push Day, Leg Day, Pull Day etc...
Then you Add Exercise to give that day a workout (Name, Reps, Sets), this line currently also gives you the option to delete that day.
THEN you see the workout day in table view, with an edit button to delete an exercise if you want..
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
To the present. Here's what I'm thinking. Instead of having all these bloody buttons, I'm wondering if it would be better to instead have "Add Workout", which populates the day into the table, and from there you have "Push Day" [Add] [Edit]. Clicking Add will add 3 input boxes below the current text for Exercise, Sets, Reps. Clicking Edit will reveal the "Action" column to delete an exercise... I'd love to be able to edit the exercises/sets/reps but I've no idea how to code that.. (when you hit edit, it basically turns every text into an input box with the text in there for your to edit, or keep as is).
GitHub
GitHub - callum-laing/cdl-workout: Site to track my workouts and nu...
Site to track my workouts and nutrition using VueJS and Vite! - callum-laing/cdl-workout

351 Replies
Why not render a calendar and allow to click on a date to set what type of exercise could be an existing one or a a new one? Once saved it updates your google calendar.
That's a great idea, that's similar to what my workout app has
Seems the most obvious thing to do imo, but ig that's just me xd.
Could even allow the user to set the saved exercise repeated weekly/monthly etc.
oh sorry, didnt see you here vince, ignore my DM spam lmao
Don't laugh at my workout frequency I've been slacking lol, but this is what my workout app shows. On app open its a list and then the + button in the bottom right opens up. By default it opens a workout for the current date and time but you can click an input to open a calendar


that's a brilliant idea, how the heck does one even start with that lol
I recently used google calendars API thing and it's very easy to pass the subject msg time etc.
You just manipulate their url the querystring.
calendar that I can hit + and then select an active day e.g. push/pull/legs/whatever
That sounds like a new project, probably isn't worth completely re-doing this one
Maybe you can find a package or something to help with the calendar, unless you wanna do it form scratch.
To get back to the original question though, I think you should just sketch it out in Figma. What you sent me in DMs, everything just looks too squeezed and the table is floating so it just looks out of place
Even just straight up copying or getting heavily inspired by other workout apps is fine too, you're just doing this as a personal project
If you struggle with like structural layout I advice to follow the 12-8-4 column grid system. Bootstrap grid actually uses it but for designing your sites it's very helpful cuz everything will break smoothly.
Let me look this up
Sadly this is on my portfolio at the moment đ only reason I'm trying to make it look less crap.
Of all things crossmedia design webdesign is actually the easiest to really get started because of the amount of guidelines you can follow, obviously making the website look outstanding still is difficult xd.
I don't think you have this for poster design for example, only maybe rules for color contrast en fontsizes but not much more.
Bootstrap used to had a chrome extension to see the columns in the browser, but it doesnt seem to work anymore for quite some time.
This is kinda what I meant, btw

But without the middle card
I think it doesn't help that the table looks like a table
I don't mean that sarcastically either just genuinely lol
I would put add workout underneath the table and align it either to the left or right side.
Table is the right semantic element probs but even just removing the *some of the borders would probably help a little bit to look less busy
I actually think the table looks fine and appropriate.
I think it looks too cluttered atm
Too much info in too small of an area
If you want to keep the table borders increase paddings
My 2c
I think that's cuz of the input fields should only appear when the user is creating a new exercise.
Either way, remove the box shadows for now. They look really dated. You can add them back after.
Give the table & card a white background to make it pop out from the foreground, and add a subtle lightgray border to the card to make it stand out more.
Round the table and card slightly, that's more 'modern'
Legitimately just try to make it look like every generic SaaS app for now
One thing I know about box schadows is they should be at least %50 transparant, and preferably "invisible" if you know what I mean.
But I suppose it depends on the style that you're going for.
I do have to say the color palette in your second ss looks a lot more modern then your first one.
This is considered a styling reset, eh? hah.

Legitimately looks better already just because the contrast between the data and background is higher
It's easier to discern
I'd make the borders around the cards very light, like light gray
You just want something subtle to transition between page bg color and card bg color
Push day table should be same width as card
Possibly the background, but I liked the first table a lot more cuz the data was a lot better devided and easier to see what's what.
Yea for sure experiment with the table borders too
I could put the border back into the table but make it lighter, perhaps
I think maybe row border-bottoms could be interesting
I think you should search for some table designs online and adapt them to your style.
true, lol
I get what you both mean now, I'll keep playing with this

Trying to figure out where those damn gaps are between each th/td
Granted I don't use Vue but your code looks good. Why do you think it's a mess?
I don't tend to think about what I'm typing, so I just keep adding stuff
Welcome to being a JS dev lol
btw, I think perhaps this would work better as 2 columns?

add workout, push day/delete/add on the left, and the tables on the right
Yea I think you need something to fill in the white space
Workout / days as a sidebar and then current day exercises as main content?
Table doesn't have to fill up whole screen but larger than what it is now
yeah kinda like that
my amazing paint skills


Yup
Was thinking something like this

middle is the table, what's the left? o.O

The days
Just spitballing
ah ok
my only issue is styling that layout hahaha, I'll have to look tomorow, gotta shut down for the night

doesn't work as well I guess, unless I bring it into the center more, and make it a large card with a dark background or something
like a card in a card
There's a few hitches to getting it done but it won't be too hard, especially if you don't care about toggle functionality for the sidebar đ
Is pretty much enough to get the really barebones layout
yeah that gives me a huge table with loads of white space haha
depending on what I do with the page width though, right now it's width: 1600px;
Then if you want to be fancy you can do something like
I never know what to do with width in containers
Took me a while to figure out but give all containers a max-width
That's the secret
This will make all containers be exactly
1600px in width but not grow passed
And then you wrap all your sections in containers and you get perfect alignment
But that's unrelated to what you're doing here
Just give your container / table some max-width like 800px and a width of 100%here's the entire page view if I use 1200px as the max-width, again, not sure what people generally use as a max-width

I think tailwind is 1600; I generally just go with whatever tailwind has - they have good defaults even if you don't use it
E.g for my breakpoints I use all tailwind values - e.g 1024, 1280, 1536 etc
(which lines up with device scaling iirc)
1600 goes wild, but it'll do for a starting point

Minus the alignment I think that looks a lot better than what you had before honestly; it's a lot more readable and there's room for everything to breathe
I love the calender idea, I've gotta think about how I can implement that at some point
yeah the alignment is because of the table headers
I like the edit icons on top of the tables
ooo
oh sorry no it's not, that's exercise/sets/reps. Push Day, Legs Day is the issue here
".dayHeader"
Why don't you put that whole push day header and table inside a card, that way it's 'grouped' together and the alignment won't look off. give the card a white background, remove the border radius and white background from the table and see how that looks
give the card some padding eg like 2rem

that'll do for tonight I think. Tomorrow I may pick some font pairing and see what else I can tweak
Getting there đ
yeah for sure, looks a massive amount better already
I imagine if I wanted colour in here somewhere, I could just give the background of the table a light pastelle colour, but this is good for now
can do the same card for the left side too, so it looks uniformed
Give your buttons the color too
I would have the tables all next to eachother like a grid, when clicking on edit the 2 buttons should appear to delete a day and edit an exercise. Somewhere above it a button to add a different day. You don't need those seperate islands with the buttons.
I have thought about this tbh. I think Add Day can stay on its own and then the delete day/add exercise can populate next to the âPush Dayâ when I click edit, as suggested. That would actually leave me nicely with some space to add the calendar on the left!
Idk if "Leg days" etc are appropriate names for the tables, should be "[name] exercises" and add a column with the date or something.
You can store all the data in a object which would act like a fake DB.
If you update the table then your calendar will update as well automatically.
Tempting
Iâll go through the code and see if I can make full sense of it tonight, if I canât and if I struggle to explain it to someone, Iâd be tempted to do it from scratch
Btw.. I did this with just, is that overkill? I used Nuxt as originally I was going to add either supabase or a db to this, not sure how easy that is to do with vue3/vite
Idk much about vue, actually close to nothing. The first experience I had with it was not fun.
The teacher was flying through the exercises, they actually recommended us to activate copilot or otherwise we wouldnt be able to follow.
Which is probably why I like react a lot more, cuz at least I somewhat understand what I am doing.
Thats fair, I guess the Vue specific things can be a pain to understand at first like binding, emit etc.. but fairly helpful once understood. Everything in react feels like it needs importing, like itâs an empty shell that requires constant layering lol
The only thing I Remember that compared to vanilla js it was magical cuz you didn't need an extra js file you could just add it in the html itself with like v-if etc. But from my understanding your values aren't immediately reactive unlike react. With vue you gotta do v-model stuff and use ref.
Thatâs fair 𤣠I always mean to do a react project just to have something in my portfolio, but I never get round to it, or Iâll do part of one and never finish it
React syntax wise is a lot closer to creating vanilla js functions with using innerHTML to make stuff dynamic. That's how I have seen dynamic web, which also helped with react.
This site is good for comparing the framework syntax https://component-party.dev/?f=react-vue3
Component Party
Component Party
Compare JavaScript frameworks side-by-side: React, Vue, Angular, Svelte, Solid.js, and more. See syntax differences, features, and code examples for web development frameworks.
@Rägnar coo-ee
I'll need to backread a bit but let me tell you... your UX is shiet XD
And this is the improved model!
damn...
I guess the TL:DR here, is do I nuke it and start again, or can I fix this đ
I would like to remove the left side columns, and have everything basically customizable inside the table, tbh
looking at the amount of code alone I would say start fresh, it'll be easier
WYSIWYG for the win
in situ editing is always superior
googling wysiwyg..
oh ok
ok, first comment, use TS in you script setups, type your shit
it makes everything easier
second comment, you did bodge your component split
this kind of thing is a sign of it .
Yup.
(day if you have manager in the name of something usually it means it's poorly named
especialy if it doesn't manage shit XD
looking at how you split the data mutation UI-wise I would say you should use pinia to store and handle your
days ref and the changes made to it
your home view is pulling way too many strings
days.value[index].nameSet = true
this should be a computed
don't store computed data
the only situation where storing computed data is acceptable is for performance optimisation
that's the only valid reason to do itGotcha
Sounds like a start-over is on the cards đ
days.value[dayIndex].exercise.reps.push(null)
are you... storing an array of null and using the length as a counter ?!?!
the fuck's wrong with ya mate ?!hold up, where's that
I want to say this is ugly as fuck... but I would have written it the same so... I can't realy say it XD
Homeview.vue line 45
on main
oh, hmm
hmm...
This is messy..
I think... null was because I'd click edit, and it'd open an empty input, no?
maybe I'm wrong
oh and I can't not notice you don't have VueDevtools installed in the project
https://devtools-next.vuejs.org/guide/vite-plugin
never used it
try it out, it'll make using vue even easier
and it integrates with pinia and vue-router too
and many other vue libs 'cause you can make custom plugins for it
gotcha, tell you what, let me start a new proj and get TS, Pinia, VueDevTools setup
this was in nuxt, i'll re-do it in vue/vite
that's not nuxt
that's a bare vue app
with vue router
Jeez.. ok well, I'll tidy the styling up on this a little quickly then i'll move onto the new one lol
and i'll split components as I go, not after 6 months
ok no... you're not using an array as counter, but you have a useless array with only 1 item that can be null or a number
we can do a code along now if you have some time
could hop on VC and do it there
can do, but you'll be pulling your hair out!
bah... you can't be worse than people I taught to in the past
ping me whenever you're ready
I'll keep looking at your stuff a bit more
I think I'm good to go
Ayyy...

Not entirely sure where to go from here đ I'll push the changes to github
Now that you've got your data, you can render it out if you haven't done that yet đ
<p>Sets: {{ sets }}</p>Alrighty then, so far so good I think?
https://github.com/callum-laing/cdl-workout/tree/new-main

Now I guess I try and code it so that the input boxes submit and populate?
Me thinks so but Ragnar might have a better idea
True, I feel bad pinging him but.... @Rägnar
I did go on a whim and briefly did some... stuff... such as....
Why such a long ID?
uuid đ
Ah
That's my updates done for the night https://github.com/callum-laing/cdl-workout/tree/new-main
Since the voice chat, I added new refs for editExercises/editWorkout, this let me add a conditional into the html to either show the inputs + done button, or the text + edit button.
No preview?
oh you can't see it , i dunno lol, im re-building it on a new branch atm so there's not really any visuals to look at


while I understand why you did the edit/not edit thing, I would like to ask... is there no other way ? why should the displaying and the editing should be 2 separate states ?
Good question, I couldn't think of another way.... is there? đ
I guess I could potentially make it so that all input become editable if I hit edit, instead of splitting it?
To do that I think I jsut stick an editMode ref in App.vue, and prop it into the 2 components, and then have a global edit
Let me rephrase, what does having an edit mode gives you that having everything editable at all time doesn't?
Oh, hmm... just looks finished I guess? unless I style the input boxes so they're just an underline or something, instead of the box itself, then it'd probably look fine just being editable permanently
Something like...
Something like this yes
And it might sound weird but, your exercises section in each workout should be a table. It's tabular data (2d data where a row has a set of property defined by the columns) and you already displayed it as such in your previous version so might as well go all in.
And yes, an input doesn't have to look like an input if you can infer from the context that it is editable.
(make sure you still have a clearly visible focus mode though)
Iâll give it a whirl tomorrow. The html Iâve added is just boilerplate atm, table definitely makes more sense
Aight I'm coding
Well.. I'm attempting to code
Absolutely no idea how to do this as table.. I tried, but it keeps making a new table when I click add exercise đ
What do you want to do exactly?
Uhh, same as before I guess, create workout, which builds an empty table, add exercises to that table
edit button that lets you edit the workout name, and exercise name/sets/reps
How would you had the exercise to the table?
click add exercises inside the workout table, and it should populate an input in a new row of the table to add the name, sets, reps
I kind have it working but it's not great.
I updated
and my table looks a little like....
So you want to have a table that represents a workout and in that table, rows that represents an exercise.
Correct?
Yeah, I think I have something, but I've been looking at my previous components to get snippets, whilst trying to keep it neater lol

Looks like it works:)
You messed up the componentisation again though (if I go by the snippet you posted)
Ah, have I?
let me push the code to github so you can see it, instead of me just showing a screenshot
I'm half drunk and in my bed so... Unlikely xD
What is the responsibility of the workout component? And the exercise component?
well WorkoutItem should be handling each Workout table. but I have the "edit all" inside that, instead of having an edit workout, and edit exercise, I combined it into 1 button
ExerciseItem "should" just be handling the exercises
At least you are aware
What prevented you from having the one button and respecting the compartmentalization ?
(i'm not going over the "you don't need an edit button" thing again, you want one, you make one, it's your call)
Not sure tbh lol, I asked the mrs and some friends and they agreed having the ability to lock the text/numbers made sense over just leaving them permanently editable all the time
as a "here's an app, what would you prefer" kinda question
I said i'm not going over it again
oh didn't read that bit lol my bad
And you failed to reply to the actual question xD
simple answer is - I'm a newb and didn't think I could do it by keeping them separate? đ
Though I "think" I have WorkoutItem having control of the edit button which passed "editable" to ExerciseItem and when "editable" is true, the display switches from text/numbers, to inputs, and vice versa
That, and I wanted 1 button to control the workout name + exercises, instead of having 1 button to edit workout, and 1 button edit exercises, I guess it made sense to have 1 single button edit the entire table for ease-of-use
But did you try or at least though about it?
How is that not compatible with a single button?
It is, isnt it?


Dunno... What is stopping you from doing it? What would you need to make it possible?
I don't understand what you're asking anymore đ
Idk if I would make the table stretched to 100% width. Same with text if it becomes to long it becomes hard to follow.
Ignore the styling, I just did a tiny bit so it was readable đ
I want the coding sorted before I start seriously styling it
I need to at some point add auth so we can login (if itâs worth it). I also need to add a way to delete the workout entirely, rather than just exercises
Isn't having both buttons better UX? Edit could be to edit existing workouts without accidentaly adding new onces. Add workout could be dedicated to adding a new one but not editing already created onces.
Is having a single button AND having ExerciseItem handle a single exercise each possible?
Less buttons = better UX in most cases
And if you scroll up you should see me arguing that the edit button is useless. But that's just my position.
I think thatâs what I have, no? I could be wrong đĽ˛
Not judging by the snippet you shared
GitHub
GitHub - callum-laing/cdl-workout at new-main
Site to track my workouts and nutrition using VueJS and Vite! - GitHub - callum-laing/cdl-workout at new-main
But if less buttons means more confused users that becomes worse UX. I suppose in this example doesnt really matter to much.
Yes and more buttons that do nothing useful in context becomes worse ux too
I'm not saying removing buttons make better ux
I'm saying better ux has less buttons
What if your target audience loves buttons?
Yeah thatâs fair. I have add workout and add exercise buttons. 1 creates a table, 1 adds rows to a table. Then the edit button just lets me edit the tables obviously. If I remove the edit button and just leave inputs, that eliminates a button haha
Suddenly less buttons becomes worse UX.
You understand fast but you need explaining for a while
People are allowed to be wrong
As a developer you don't built sites for yourself but for the customers from your client. So therefor the customers must be heard if you want good UX. Target audience determines in a way what good UX is, should they have 100% influence on it? Definitly not.
Customers are notorious for not knowing what they want.
They are good at saying what they don't want. But that's a topic for another thread
To my understanding it's the developers job to decifire what they want, and is one of the things that creating fully custom sites very expensive.
Please move to #chit-chat #off-topic or another thread in #help
đ¤Ł
Sorry mb haha
my ocd can't handle this
Slight update, styling has been tweaked a little, still ongoing. Next is to add a button that I'll probably put next to edit workout that let's me delete the workout entirely.
Right now edit workout lets me change the workout name, and add/edit/remove exercises, this is all specific to only that workout.

edit mode:

looking good
Is that franklin gothic condensed
the font?
font-family: "Quattrocento", serif;
ooo interesting
This is what we're working with currently

Might move Add Workout so it sits vertically aligned with the Workout days, instead central
Why would you allow to add a unnamed workout?
Because I haven't fixed it yet, I was too busy trying to style it a bit đ
I like this style of design add splash of color and your good to go imo.
I'm not entirely sure what to do with color tbh.. I thought something like this, but maybe it's a bit too much...

white text is quite hard to read in the buttons
You could just replace the current colors like you have rn with your own but like with the same saturation I think.
ah like the table bg, and then button bg, yeah ig
keep it simple
This ( --> https://discord.com/channels/436251713830125568/1425578597929717950/1429897583966294157) looks more modern to me then this (--> https://discord.com/channels/436251713830125568/1425578597929717950/1429912365721452564 ) imo
In the end you gotta decide obviously xd.
yeah I'll check out some color pallet ideas and see what I can come up with
Wouldnt mind some help with colors lol, it's a bit messy.
button:hover is a slightly darker shade, and the box-shadow transitions to none
alternative: turn the buttons into text with a color/color'd underline on hover instead

For colors, as seen here you have your dark grey you have your background color and your border color. Just use 3 colors and put replace the current onces with the new onces.
I added padding to the workout header/buttons so they align with the table btw

rule of thumbs for colors :
- only use HSL or OKLCH
- keep in the 60% to 80% saturation band for colors and 0 to 20% band for grays
- keep to the 80% to 95% liteness for light colors and the 10% to 50% for the darks
you'll get ok looking colors with good enough contrats in most cases
I definitely want to take some lessons on improving color palettes, choosing the right typography etc lol
I feel like color and font alone can make a huge difference to projects
colors are not that hard, you just need to work in opposites while avoiding extremes
never full saturation, never fully desatuarated
never fully bright or fully dark
I've been using rgb or # for the most part haha
'cause if you do that you just get grey, white of black and that's boring
then stop, use hsl or oklch
(preferably the second one as it will give more predictable results, but hsl is better supported (but you can always have a postcss step that converts everythingt to hex rgb at build time anyway))
ah so hsl is color / how intense the color is / how bright or dark the color is
that seems easier to work with
hue, saturation, brighness
OKLCH is the OK version of LCH (litterally)
and LCH is lightness chroma hue
which is vaguely simmilar to HSL but better fits the human perception of colors
i've never heard of oklch/lch, let me check it out
I only really used rgba/# because I'd just google color pickers and use their returns ,and then tweak, so I got into that habit lol
you can get a sense of how things work here :
https://codepen.io/ragnar_ock/pen/zxvWagB
it lists all the different color spaces (that's what HSL and OKLCH are) wand how they compare when used for gradients
oh wow, neat!
should this not be hue, 50%, 100%? đ

feel free to edit the template to issolate the ones you want to compare (I should remake it with a selector instead...)
This is incredibly cool, thanks for sharing
Don't start this shit again..
ficed it (it's actualy 100%, 50% => 0%, 50%)
what the fuck did you do ?!
Literally nothing, I opened vscode from last time, did a bunch of changes in my files in the css, and just did git add ., git commit -m "aadalaldl" and it spazzed out
seams like git was interupted while writing stuff to disk at some point and didn't finish to write the blobs
blegh
last time I tried to fix this I ended up wiping the repo and restarting lol
did you push everything already ?
'cause if not you could try this :
https://stackoverflow.com/a/31110176
Stack Overflow
How can I fix the Git error "object file ... is empty"?
When I try to commit changes, I get this error:
error: object file .git/objects/31/65329bb680e30595f242b7c4d8406ca63eeab0 is empty
fatal: loose object 3165329bb680e30595f242b7c4d8406ca63eeab0 (stor...
not today I haven't, my last push was last week onto the new-main branch
what's the backup command?
backup ?
this and the other fix I saw on stack say backup your git repo first lol
it's borked there's no point in backing it up
and those commands can not lead to any data loss if performed as is
Nevermind, what you linked did exactly what I needed
nice
thank you đ
so that just deletes the empty files in .git/objects and fetches anything missing
first one finds all the empty file objects in the .git folder
second one fetches the (now) missing objects from the remote
last one performs a sanity check on the data and doesn't modify any data on disk
I'll make a note of that, as i've had this happen a few times over the years.
usually this means you are shutting down the system improperly
I probably did a rushed shut down like a "these files are still in progress" -> end now
yeah... don't do that XD
yeah lol, lesson learned. right, localStorage, then merging branches time (I have yet to ever do this)
btw... I want to be able to hit enter to save my inputs, so for workout I've just simply added @keyup.enter="toggleWorkoutEdit" which seems straight forward.. now some quick googling for the same in exercise has me using emit and then handling that in the ExerciseItem component like...
Is this the right way to do it?
reads correct to me, keying enter inside an exercise input simply changes the toggle of WorkoutEdit (which is what my workout name input is doing on enter)
keyup events bubble, so you can have a single listener for the whole workout, if it's gets trigger you flip the edit flag
Ohh... even better
wouldn't mind making my alert for a requirement in the name a little... cleaner.. i.e. not using an alert đ maybe the input box border goes red or something

man you gotta clean up those colors đŤŁ
otherwise i like it, looks good!
you hatin' my colors?!
yes haha
I need to change them all anyway as I want to try that HSL setup, I think it'll make it a lot easier to transition etc
I kinda like the button colors, weirdly (not add workout, I have no idea what to do with add workout, it being a random button at the top feels weird)
Colors or not hard for simple solo projects*
what ?
You said colors are not that hard, I agree but only under certain circumstances.
I didn't say they are easy, just not that hard
If you want something really good with colors you gotta have that "touch/feeling" for it.
Perfect use case for :user-invalid â you can also set custom messages in the default browser validation. Kpow just recently posted a video about forms and validation.
Kevin Powell
YouTube
How to set custom error messages for your HTML forms
The browser comes with native, client-side form validation that works quite well, but the errors have a few issues, from problems with internationalization, and no way to custom style them. Luckily, we can use the same API the browser uses under the hood to customize our errors quite easily!
đ Links
â
Frontend Mentor Project: https://www.f...
Nice, thanks! Thisâll help
Oh weird, I must have updated the main branch wrong as the app still shows the add days section lol. this wasn't showing after i merged the branches last night, but is on my github.. how odd

I don't even see the code for the left side column in my code lmao..
did you push all your changes?
I pushed everything on both branches then I merged new-main into main. The weird thing is, my github doesnât show any of this add day code at all, but itâs what I see on the app preview 𤣠unless for some reason it hasnât updated through cloudflare?
oh... yeah cloudflare pages is failing for some reason
AWS issue still maybe? đ

lol

ya broke it
No idea how I fix this, I literalyl haven't touched cloudflare in months lol
time to delve into google
"Cloudflare build environment uses Node.js 18.17.1, but Vite v7.1.11 requires Node 20.19+ or 22.12+. The crypto.hash is not a function error confirms Node version incompatibility."
The fix seemed to have worked.. I added a variable inside cloudflare on the project that was NODE_VERSION and the value was the version of node.. seems to have worked, not sure if that's a long term fix or a band-aid though.
you'll know the next time it breaks XD
least I fixed it for now I guess
Think I may need to add something as some sort of a "welcome" page before you add any workout, so if like... workouts.length === 0 -> show this, otherwise -> show the workouts
If this is the App.vue html...
How does one have Add Workout button underneath the text if workouts.length === 0, but above the table if !workouts.length === 0?
with
v-if
just slap a v-if on itI have one inside the text container, with the else being a wrapper on the component (wasn't working without it)
you can use
template for v-if v-else and v-for if you don't want it to show up in the DOMI templated inside my template, I think that's what you meant?
Better than nothing, for now. This is the view with no workouts

Keep forgetting to add localstorage, though the plan is adding a login so everyone can log in and save workouts.. eventually workout templates. And thatâll be where the calendar will come in đ
the font makes me sad

that's because it doesn't fit
I think it's very plain too, no? as in, the background in general
do you want my honest opinion?
Always đ
that blue doesn't work at all
and you have everything with the same background color
so, it just looks like a blob of nothingness
Yeah I agree, that's what I'm trying to fix atm đ font + coloring
you need to have a background for the header, then have 2 different backgrounds for the rows
odds should have one, even should have another
I wanna do a quick restyle... may I ?
(imma do it anyway)
go for it
I'm tempted to box the header, and add a footer, with a faded line to separate, mgiht make it look less.... open..
ah like the old excel tables? đ
the new ones
just the blue, then odds have no background and the even have the background color at 25% opacity is a huge improvement
what?!

huh?
the 100%
oh lol
weird, I can't seem to center the footer text xD just sits slightly to the left
probably extra whitespace or padding or something
yeah no idea lol

without seeing it myself, im just guessing
yeah I'll look into it tomorrow, I think the header already feels nicer, maybe similar with the footer, who knows

it looks better, but still, you're just coloring everything
makes reading the table an infuriating irritating mess
I'll reset the colors to variations of black/white/grey tomorrow and then look at what I can do with it
not black
do not use black
if you need something dark, use an off-black
like #222222
gotcha
Encountered another issue, I can't scroll đ alright I have a list of things to fix tomorrow
Please don't center the text in the table, not like that anyways...
the name does look weird like that
exercise name is taking up way too much space in that table, should be much shorter
your table is HUGE
I'm not great at sorting the layout for tables, I have width 100%, so I would've thought it'd be wide enough to fill the content only, but ig not
Also make sure to add the column lines for the table, afaik it's good UX to clearly seperate you things when in a table.
maybe I need to reduce the max-width on the container
The table looks okay, but ye there is to much room for the names.

That seems a lot better, but you should look at examples of tables online to see how they do this.
dude, just remove the background of the odd rows
Yeah I'll do some reading tomorrow at work (i'll remove the odd rows), gotta go sing happy birthday to my gran and sleep lol


(I'm not great at making and using icons, I think they are too big)
Oooooooooooooooooooooooooooo
That's better
Definitly to big, and kind of look like a color picker as well. But maybe that's just me.
little tables, not 1 giant table across the screen
probably better like this

But I do actually like the icons xd.
the font I used is kinda fucked up as far as alignment and sizing goes
you're gonna have to share how you did that so I can alter mine a bit, that does look a lot better haha
Maybe a seperation line underneath the title and icon thing with an opacity or something?
like dis ?
I'm not a fan of rulers

I like this! I think to add onto this we could use font awesome icons (we can just download the svgs instead of actually using FA) and give the workout cards a background color like white?
I don't think the rulers are necessary either, you have enough whitespace to differentiate but that's my 2c
If you add them I'd make them suuuuper thin like 0.5px dashed maybe?
it's very much corpo styled though
(it's kinda my only style when it comes to UI XD
Yea but I think corporate style is fine to just get an app that looks decent up
Same lol
It's fine to make your app look like every other saas app
It's better to have that than something that doesn't work as well
Then you can iterate on it, but that's my 2c again
like this ?

Ye, sometimes you gotta see it in action before deciding if it can be used or not. I think I like it tho.
Yea I actually love the dashed borders but I'm biased -- I've always liked the dashed style but no one ever uses them đ
ho and... I used a grid but... I think a massonry layout would look great on that
no way of making on easily in figma thou
Are you using Outfit for the font?
nah, it's a google font called Dongle
which is a corean font XD
One of these days I'm going to guess the font correctly đ
Looks very much like Outfit
hense the fucked up baseline
https://fonts.google.com/specimen/Outfit
Outfit is a bit more blocky actually
https://fonts.google.com/specimen/Dongle
I wanted one with rounded ends
Yea it looks good! I like it, never saw this font before
I really like how it looks in korean, too bad I have no idea what it says

what do you mean by that ?
I mean, the way you've styled that suits a workout app a lot more than the way I've done mine đ I seem to always fall under the "I have to center everything" kinda thought pattern
Obviously if I did the way you have and only had 1 table it might look a little baron, but the idea is to add a calender etc to it eventually so that alone would take up 1/3rd of the empty space
I think you could center it if they're actively editing it (and make it larger) -- grid view for everything else?
Maybe hook up a ViewTransition too đ
Not meaning to step on any toes, but at this point are we really helping or steering CDL?
Lol steering for sure, I'm just having fun he can take any suggestion he wants (or none) đ
Nah Rag's just giving his opinion on it
I've pushed my changes for now, tomorrow I gotta figure out why my dang footer isn't centering, and some other shtuff.
I do like the idea of having the tables in rows of 2, rather than single rows, I notice straight away if I add more than 2-3 workouts then I'm scrolling quite a bit.
Example:

for the tables I have the 2 right columns as fixed with and the left one is free to grow to fill the space (I assumed you would no do more that 999 sets of 999 reps xD )
for the title it's a game of "how much bigger does it need to be to stand out? usually 1.5x is the most you need to go. I think I have 24px for the workout name and 20px for the table content
the pen/edit icon is on the right because having it on the left near the text make it feel like it's illustrating it. I could have made it smaller and at the end of the line but 1) it would make it look like it's to edit only the title (proximity, association, all that) and 2) I can't find how to make the icon resizable and I'm to lazy to find out
something you can try to do is having an exercise line be auto inserted at the end each time it is filled, that way you can do away with having an "add exercise" button, which makes the UX better for keyboardo only editing and the UI cleaner
and it's also a nice challenge to implement it (it's not hard to do, but you need to think a bit to have it work simply)
As in, after the last exercise just have an empty input row?
another thing would be fixing the width of the sets and reps columns, no point in having them resize and it makes the UI look broken when they don't match up between 2 consecutive card
yup
and add one automatically when the user fills it
I like the idea of that tbh, gets rid of the add exercise button, I do hate the buttons.
and you can also have one inserted when hitting enter in one of the row's input
Add workout opens a card and that card has the empty input. Enter/tab after the last input is filled and it generates a new exercise row
yup
Adding it to the todo đ
(make sure you set the focus on the workout title input upon creation)
and once you have that you can try to implement focus navigation with the arrow keys like in excel
up goes to the same input in the previous row
down same but down
left goes to the previous input if at the start of the current input
right same but at the end
(make sure to not impact
ctrl+arrow word by (work skipping) or shift+arrow (selection editing) though)
thats the kinda thing that separates a good looking UI from an actually good UINever thought of doing something like that, and I did find it tedious having to click to move lol. Thatâs something Iâll do once I have the layout sorted. sounds easier said than done as I imagine itâd be a case of arrow key is turning the data from text back into an input
there two kinda hard parts :
1. knowing which element should get the focus next (if you need to move it)
2. finding a way to tell that element to now be in focus (and that's the hard part because there's no easy way to do it in vue, you have to make your own)
data/state driven focus doesn't work, and vue is especially good when you can do data/state driven UI
but because there's only ever one thing in focus at any given time, you don't control the focus state, you control the focus transition (i.e. there's no
isFocus = true there's only .focus() and .blur())
#UXisMyPassion xDThat will be further down the line hahaha
But I love the idea
I turned the pc off but Iâll make some notes after my MRI scan tomorrow morning so I can try and implement these.. seems this thing can be scaled pretty infinitely đ¤Ł
yup
there's no perfect UX, you can alway make it better
but it gets harder each time you make it so
First Iâll center the footer, keep it visible (I think), tweak the cards so they are rows of 2-3, then work on the rest
For sure
Appreciate the assistance tonight đ
Might try to do something myself if I have the time. I am just confused with the names of the workouts, "Push", "Pull" . Are these random names that contain exercises in it?
Push relates to muscles that require pushing momentum to work e.g. chest, triceps, shoulders
Pull for biceps, back
Itâs just what I call my workout days 𤣠push/pull/legs
I have stopped my weekend laziness, I am trying to amend the uhh... layout
so, the everything?
Yeah... that...
Wee bit stuck but I have the 2x2 column in grid going at least lol
that's something

Gotta sleep but I wonder if someone is able to take a look at the current code and see if you can figure out why my Add Workout doesn't align with the start of my left card?
Also uhh... I'm not entirely sure how to differentiate my edit workout (or the pencil) from the done button when I click the pencil, because right now it's a conditional to say editWorkout ? done : edit workout (any help with centering the bloody footer would be greatly appreciated too!!)
https://github.com/callum-laing/cdl-workout
https://cdl-workout.pages.dev/
any help with centering the bloody footer would be greatly appreciated too!!

you can pick one of these:
- remove
max-width
- specifically set this to have 100% width
- center the contents of <footer>why do you have a margin and a gap ? there's like 5 km between the cards

he's adding new lanes to the highway of information
I⌠donât know lol. On my screen the cards are pretty close together. I rushed it tonight though only had a lil time to change it up, Iâll spend more time tomorrow tidying up the css as itâs getting messy again. Iâm sure I can achieve what I want with a lot less styling
For the add workout, I suggest check-in your padding for the text.