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
No description
351 Replies
Kingpin
Kingpin•2mo ago
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.
vince
vince•2mo ago
That's a great idea, that's similar to what my workout app has
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
oh sorry, didnt see you here vince, ignore my DM spam lmao
vince
vince•2mo ago
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
No description
No description
CDL
CDLOP•2mo ago
that's a brilliant idea, how the heck does one even start with that lol
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
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
Kingpin
Kingpin•2mo ago
Maybe you can find a package or something to help with the calendar, unless you wanna do it form scratch.
vince
vince•2mo ago
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
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
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.
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
This is kinda what I meant, btw
No description
CDL
CDLOP•2mo ago
But without the middle card
vince
vince•2mo ago
I think it doesn't help that the table looks like a table I don't mean that sarcastically either just genuinely lol
Kingpin
Kingpin•2mo ago
I would put add workout underneath the table and align it either to the left or right side.
vince
vince•2mo ago
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
Kingpin
Kingpin•2mo ago
I actually think the table looks fine and appropriate.
vince
vince•2mo ago
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
Kingpin
Kingpin•2mo ago
I think that's cuz of the input fields should only appear when the user is creating a new exercise.
vince
vince•2mo ago
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
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
This is considered a styling reset, eh? hah.
No description
vince
vince•2mo ago
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
Kingpin
Kingpin•2mo ago
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.
vince
vince•2mo ago
Yea for sure experiment with the table borders too
CDL
CDLOP•2mo ago
I could put the border back into the table but make it lighter, perhaps
vince
vince•2mo ago
I think maybe row border-bottoms could be interesting
Kingpin
Kingpin•2mo ago
I think you should search for some table designs online and adapt them to your style.
CDL
CDLOP•2mo ago
true, lol
CDL
CDLOP•2mo ago
I get what you both mean now, I'll keep playing with this
No description
vince
vince•2mo ago
tbody tr:last-of-type td {
border-bottom: 0;
}
tbody tr:last-of-type td {
border-bottom: 0;
}
CDL
CDLOP•2mo ago
Trying to figure out where those damn gaps are between each th/td
vince
vince•2mo ago
Granted I don't use Vue but your code looks good. Why do you think it's a mess?
CDL
CDLOP•2mo ago
I don't tend to think about what I'm typing, so I just keep adding stuff
vince
vince•2mo ago
Welcome to being a JS dev lol
CDL
CDLOP•2mo ago
btw, I think perhaps this would work better as 2 columns?
No description
CDL
CDLOP•2mo ago
add workout, push day/delete/add on the left, and the tables on the right
vince
vince•2mo ago
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
CDL
CDLOP•2mo ago
yeah kinda like that
CDL
CDLOP•2mo ago
my amazing paint skills
No description
CDL
CDLOP•2mo ago
No description
vince
vince•2mo ago
Yup
vince
vince•2mo ago
Was thinking something like this
No description
CDL
CDLOP•2mo ago
middle is the table, what's the left? o.O
vince
vince•2mo ago
No description
vince
vince•2mo ago
The days Just spitballing
CDL
CDLOP•2mo ago
ah ok my only issue is styling that layout hahaha, I'll have to look tomorow, gotta shut down for the night
CDL
CDLOP•2mo ago
No description
CDL
CDLOP•2mo ago
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
vince
vince•2mo ago
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 😄
display: grid;
grid-template-columns: 300px 1fr;
display: grid;
grid-template-columns: 300px 1fr;
Is pretty much enough to get the really barebones layout
CDL
CDLOP•2mo ago
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;
vince
vince•2mo ago
Then if you want to be fancy you can do something like
.parent {
display: grid;
grid-template-areas: "sidebar content";
grid-template-columns: 300px 1fr;
}

aside {
grid-area: sidebar;
}

main {
grid-area: content;
}
.parent {
display: grid;
grid-template-areas: "sidebar content";
grid-template-columns: 300px 1fr;
}

aside {
grid-area: sidebar;
}

main {
grid-area: content;
}
CDL
CDLOP•2mo ago
I never know what to do with width in containers
vince
vince•2mo ago
Took me a while to figure out but give all containers a max-width
CDL
CDLOP•2mo ago
.container {
display: flex;
flex-direction: column;
margin: 3rem auto;
max-width: 1200px;
width: 100%;
padding: 0 1rem;
}
.container {
display: flex;
flex-direction: column;
margin: 3rem auto;
max-width: 1200px;
width: 100%;
padding: 0 1rem;
}
vince
vince•2mo ago
That's the secret
.container {
max-width: 1600px;
width: 100%;
}
.container {
max-width: 1600px;
width: 100%;
}
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%
CDL
CDLOP•2mo ago
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
No description
vince
vince•2mo ago
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)
CDL
CDLOP•2mo ago
1600 goes wild, but it'll do for a starting point
No description
vince
vince•2mo ago
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
CDL
CDLOP•2mo ago
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
vince
vince•2mo ago
I like the edit icons on top of the tables ooo
CDL
CDLOP•2mo ago
oh sorry no it's not, that's exercise/sets/reps. Push Day, Legs Day is the issue here ".dayHeader"
vince
vince•2mo ago
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
CDL
CDLOP•2mo ago
No description
CDL
CDLOP•2mo ago
that'll do for tonight I think. Tomorrow I may pick some font pairing and see what else I can tweak
vince
vince•2mo ago
Getting there 😄
CDL
CDLOP•2mo ago
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
vince
vince•2mo ago
Give your buttons the color too
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
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!
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
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
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
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
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
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
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
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.
CDL
CDLOP•2mo ago
@Rägnar coo-ee
Rägnar O'ock
Rägnar O'ock•2mo ago
I'll need to backread a bit but let me tell you... your UX is shiet XD
CDL
CDLOP•2mo ago
And this is the improved model!
Rägnar O'ock
Rägnar O'ock•2mo ago
damn...
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
googling wysiwyg.. oh ok
Rägnar O'ock
Rägnar O'ock•2mo ago
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 .
<DayManager
:days="days"
@save-day-name="saveDayName"
@remove-day="removeDay"
@toggle-exercise-inputs="toggleExerciseInputs"
@remove-rep="removeRep"
@add-rep="addRep"
@save-exercise="saveExercise"
/>
<DayManager
:days="days"
@save-day-name="saveDayName"
@remove-day="removeDay"
@toggle-exercise-inputs="toggleExerciseInputs"
@remove-rep="removeRep"
@add-rep="addRep"
@save-exercise="saveExercise"
/>
CDL
CDLOP•2mo ago
Yup.
Rägnar O'ock
Rägnar O'ock•2mo ago
(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 it
CDL
CDLOP•2mo ago
Gotcha Sounds like a start-over is on the cards 😄
Rägnar O'ock
Rägnar O'ock•2mo ago
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 ?!
CDL
CDLOP•2mo ago
hold up, where's that
Rägnar O'ock
Rägnar O'ock•2mo ago
// Toggle edit mode for a day
const toggleEdit = (dayIndex) => {
editingDay.value = editingDay.value === dayIndex ? null : dayIndex
}
// Toggle edit mode for a day
const toggleEdit = (dayIndex) => {
editingDay.value = editingDay.value === dayIndex ? null : dayIndex
}
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
CDL
CDLOP•2mo ago
oh, hmm hmm...
CDL
CDLOP•2mo ago
This is messy.. I think... null was because I'd click edit, and it'd open an empty input, no? maybe I'm wrong
Rägnar O'ock
Rägnar O'ock•2mo ago
oh and I can't not notice you don't have VueDevtools installed in the project https://devtools-next.vuejs.org/guide/vite-plugin
CDL
CDLOP•2mo ago
never used it
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
that's not nuxt that's a bare vue app with vue router
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
can do, but you'll be pulling your hair out!
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
I think I'm good to go
CDL
CDLOP•2mo ago
Ayyy...
No description
CDL
CDLOP•2mo ago
Not entirely sure where to go from here 😄 I'll push the changes to github
vince
vince•2mo ago
Now that you've got your data, you can render it out if you haven't done that yet 🙂 <p>Sets: {{ sets }}</p>
CDL
CDLOP•2mo ago
Alrighty then, so far so good I think? https://github.com/callum-laing/cdl-workout/tree/new-main
No description
CDL
CDLOP•2mo ago
Now I guess I try and code it so that the input boxes submit and populate?
vince
vince•2mo ago
Me thinks so but Ragnar might have a better idea
CDL
CDLOP•2mo ago
True, I feel bad pinging him but.... @Rägnar I did go on a whim and briefly did some... stuff... such as....
const editExercises = ref(true)

const toggleEdit = () => {
editExercises.value = !editExercises.value
}
const editExercises = ref(true)

const toggleEdit = () => {
editExercises.value = !editExercises.value
}
Kingpin
Kingpin•2mo ago
Why such a long ID?
CDL
CDLOP•2mo ago
uuid 😄
Kingpin
Kingpin•2mo ago
Ah
CDL
CDLOP•2mo ago
const addWorkout = () => {
workouts.value.push({ id: crypto.randomUUID(), name: '', exercises: [] })
}
const addWorkout = () => {
workouts.value.push({ id: crypto.randomUUID(), name: '', exercises: [] })
}
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.
Kingpin
Kingpin•2mo ago
No preview?
CDL
CDLOP•2mo ago
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
CDL
CDLOP•2mo ago
No description
No description
Rägnar O'ock
Rägnar O'ock•2mo ago
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 ?
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
Let me rephrase, what does having an edit mode gives you that having everything editable at all time doesn't?
CDL
CDLOP•2mo ago
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
CDL
CDLOP•2mo ago
Something like...
No description
Rägnar O'ock
Rägnar O'ock•2mo ago
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)
CDL
CDLOP•2mo ago
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 😄
Rägnar O'ock
Rägnar O'ock•2mo ago
What do you want to do exactly?
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
How would you had the exercise to the table?
CDL
CDLOP•2mo ago
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
<ExerciseItem v-model:exercises="workout.exercises" />
<ExerciseItem v-model:exercises="workout.exercises" />
and my table looks a little like....
<table>
<thead>
<tr>
<th>Exercise</th>
<th>Sets</th>
<th>Reps</th>
</tr>
</thead>
<tbody>
<tr v-for="(exercise, index) in exercises" :key="exercise.id">
<td>
<input v-model="exercise.name" placeholder="Exercise name..." />
</td>
<td>
<input v-model.number="exercise.sets" type="number" placeholder="Sets" />
</td>
<td>
<input v-model.number="exercise.reps" type="number" placeholder="Reps" />
</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Exercise</th>
<th>Sets</th>
<th>Reps</th>
</tr>
</thead>
<tbody>
<tr v-for="(exercise, index) in exercises" :key="exercise.id">
<td>
<input v-model="exercise.name" placeholder="Exercise name..." />
</td>
<td>
<input v-model.number="exercise.sets" type="number" placeholder="Sets" />
</td>
<td>
<input v-model.number="exercise.reps" type="number" placeholder="Reps" />
</td>
</tr>
</tbody>
</table>
Rägnar O'ock
Rägnar O'ock•2mo ago
So you want to have a table that represents a workout and in that table, rows that represents an exercise. Correct?
CDL
CDLOP•2mo ago
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
CDL
CDLOP•2mo ago
No description
Rägnar O'ock
Rägnar O'ock•2mo ago
Looks like it works:) You messed up the componentisation again though (if I go by the snippet you posted)
CDL
CDLOP•2mo ago
Ah, have I? let me push the code to github so you can see it, instead of me just showing a screenshot
Rägnar O'ock
Rägnar O'ock•2mo ago
I'm half drunk and in my bed so... Unlikely xD What is the responsibility of the workout component? And the exercise component?
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
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)
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
I said i'm not going over it again
CDL
CDLOP•2mo ago
oh didn't read that bit lol my bad
Rägnar O'ock
Rägnar O'ock•2mo ago
And you failed to reply to the actual question xD
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
But did you try or at least though about it? How is that not compatible with a single button?
CDL
CDLOP•2mo ago
It is, isnt it?
CDL
CDLOP•2mo ago
No description
No description
Rägnar O'ock
Rägnar O'ock•2mo ago
Dunno... What is stopping you from doing it? What would you need to make it possible?
CDL
CDLOP•2mo ago
I don't understand what you're asking anymore 😄
Kingpin
Kingpin•2mo ago
Idk if I would make the table stretched to 100% width. Same with text if it becomes to long it becomes hard to follow.
CDL
CDLOP•2mo ago
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
Kingpin
Kingpin•2mo ago
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.
Rägnar O'ock
Rägnar O'ock•2mo ago
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.
CDL
CDLOP•2mo ago
I think that’s what I have, no? I could be wrong 🥲
Rägnar O'ock
Rägnar O'ock•2mo ago
Not judging by the snippet you shared
CDL
CDLOP•2mo ago
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
Kingpin
Kingpin•2mo ago
But if less buttons means more confused users that becomes worse UX. I suppose in this example doesnt really matter to much.
Rägnar O'ock
Rägnar O'ock•2mo ago
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
Kingpin
Kingpin•2mo ago
What if your target audience loves buttons?
CDL
CDLOP•2mo ago
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
Kingpin
Kingpin•2mo ago
Suddenly less buttons becomes worse UX.
Rägnar O'ock
Rägnar O'ock•2mo ago
You understand fast but you need explaining for a while People are allowed to be wrong
Kingpin
Kingpin•2mo ago
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.
Rägnar O'ock
Rägnar O'ock•2mo ago
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
Kingpin
Kingpin•2mo ago
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.
Rägnar O'ock
Rägnar O'ock•2mo ago
Please move to #chit-chat #off-topic or another thread in #help
CDL
CDLOP•2mo ago
🤣
Kingpin
Kingpin•2mo ago
Sorry mb haha
Ahmed/忠誠
Ahmed/忠誠•2mo ago
my ocd can't handle this
CDL
CDLOP•2mo ago
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.
No description
CDL
CDLOP•2mo ago
edit mode:
No description
Rägnar O'ock
Rägnar O'ock•2mo ago
looking good
vince
vince•2mo ago
Is that franklin gothic condensed
CDL
CDLOP•2mo ago
the font? font-family: "Quattrocento", serif;
vince
vince•2mo ago
ooo interesting
CDL
CDLOP•2mo ago
This is what we're working with currently
No description
CDL
CDLOP•2mo ago
Might move Add Workout so it sits vertically aligned with the Workout days, instead central
Kingpin
Kingpin•2mo ago
Why would you allow to add a unnamed workout?
CDL
CDLOP•2mo ago
Because I haven't fixed it yet, I was too busy trying to style it a bit 😄
Kingpin
Kingpin•2mo ago
I like this style of design add splash of color and your good to go imo.
CDL
CDLOP•2mo ago
I'm not entirely sure what to do with color tbh.. I thought something like this, but maybe it's a bit too much...
No description
CDL
CDLOP•2mo ago
white text is quite hard to read in the buttons
Kingpin
Kingpin•2mo ago
You could just replace the current colors like you have rn with your own but like with the same saturation I think.
CDL
CDLOP•2mo ago
ah like the table bg, and then button bg, yeah ig keep it simple
CDL
CDLOP•2mo ago
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
CDL
CDLOP•2mo ago
No description
Kingpin
Kingpin•2mo ago
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.
CDL
CDLOP•2mo ago
I added padding to the workout header/buttons so they align with the table btw
CDL
CDLOP•2mo ago
No description
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
I've been using rgb or # for the most part haha
Rägnar O'ock
Rägnar O'ock•2mo ago
'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))
CDL
CDLOP•2mo ago
ah so hsl is color / how intense the color is / how bright or dark the color is that seems easier to work with
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
you can get a sense of how things work here : https://codepen.io/ragnar_ock/pen/zxvWagB
Rägnar O'ock
Rägnar O'ock•2mo ago
it lists all the different color spaces (that's what HSL and OKLCH are) wand how they compare when used for gradients
CDL
CDLOP•2mo ago
oh wow, neat!
CDL
CDLOP•2mo ago
should this not be hue, 50%, 100%? 😄
No description
Rägnar O'ock
Rägnar O'ock•2mo ago
feel free to edit the template to issolate the ones you want to compare (I should remake it with a selector instead...)
CDL
CDLOP•2mo ago
This is incredibly cool, thanks for sharing
laing91@PCS-PC:~/code/vue-projects/cdl-workout$ git status
error: object file .git/objects/ee/edf4895cd878433b0fcb1d0c6d76207c3ace15 is empty
error: object file .git/objects/ee/edf4895cd878433b0fcb1d0c6d76207c3ace15 is empty
fatal: loose object eeedf4895cd878433b0fcb1d0c6d76207c3ace15 (stored in .git/objects/ee/edf4895cd878433b0fcb1d0c6d76207c3ace15) is corrupt
laing91@PCS-PC:~/code/vue-projects/cdl-workout$
laing91@PCS-PC:~/code/vue-projects/cdl-workout$ git status
error: object file .git/objects/ee/edf4895cd878433b0fcb1d0c6d76207c3ace15 is empty
error: object file .git/objects/ee/edf4895cd878433b0fcb1d0c6d76207c3ace15 is empty
fatal: loose object eeedf4895cd878433b0fcb1d0c6d76207c3ace15 (stored in .git/objects/ee/edf4895cd878433b0fcb1d0c6d76207c3ace15) is corrupt
laing91@PCS-PC:~/code/vue-projects/cdl-workout$
Don't start this shit again..
Rägnar O'ock
Rägnar O'ock•2mo ago
ficed it (it's actualy 100%, 50% => 0%, 50%) what the fuck did you do ?!
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
seams like git was interupted while writing stuff to disk at some point and didn't finish to write the blobs
CDL
CDLOP•2mo ago
blegh last time I tried to fix this I ended up wiping the repo and restarting lol
Rägnar O'ock
Rägnar O'ock•2mo ago
did you push everything already ?
Rägnar O'ock
Rägnar O'ock•2mo ago
'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...
CDL
CDLOP•2mo ago
not today I haven't, my last push was last week onto the new-main branch
Rägnar O'ock
Rägnar O'ock•2mo ago
find .git/objects/ -type f -empty -delete
git fetch -p
git fsck --full
find .git/objects/ -type f -empty -delete
git fetch -p
git fsck --full
CDL
CDLOP•2mo ago
what's the backup command?
Rägnar O'ock
Rägnar O'ock•2mo ago
backup ?
CDL
CDLOP•2mo ago
this and the other fix I saw on stack say backup your git repo first lol
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
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
Rägnar O'ock
Rägnar O'ock•2mo ago
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
CDL
CDLOP•2mo ago
I'll make a note of that, as i've had this happen a few times over the years.
Rägnar O'ock
Rägnar O'ock•2mo ago
usually this means you are shutting down the system improperly
CDL
CDLOP•2mo ago
I probably did a rushed shut down like a "these files are still in progress" -> end now
Rägnar O'ock
Rägnar O'ock•2mo ago
yeah... don't do that XD
CDL
CDLOP•2mo ago
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...
<ExerciseItem
v-model:exercises="workout.exercises"
:editable="editWorkout"
@remove="removeExercise"
@save="toggleWorkoutEdit"
/>
<ExerciseItem
v-model:exercises="workout.exercises"
:editable="editWorkout"
@remove="removeExercise"
@save="toggleWorkoutEdit"
/>
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)
Rägnar O'ock
Rägnar O'ock•2mo ago
keyup events bubble, so you can have a single listener for the whole workout, if it's gets trigger you flip the edit flag
CDL
CDLOP•2mo ago
Ohh... even better
CDL
CDLOP•2mo ago
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
No description
vince
vince•2mo ago
man you gotta clean up those colors 🫣 otherwise i like it, looks good!
CDL
CDLOP•2mo ago
you hatin' my colors?!
vince
vince•2mo ago
yes haha
CDL
CDLOP•2mo ago
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)
Kingpin
Kingpin•2mo ago
Colors or not hard for simple solo projects*
Rägnar O'ock
Rägnar O'ock•2mo ago
what ?
Kingpin
Kingpin•2mo ago
You said colors are not that hard, I agree but only under certain circumstances.
Rägnar O'ock
Rägnar O'ock•2mo ago
I didn't say they are easy, just not that hard
Kingpin
Kingpin•2mo ago
If you want something really good with colors you gotta have that "touch/feeling" for it.
curiousmissfox
curiousmissfox•2mo ago
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...
CDL
CDLOP•2mo ago
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
CDL
CDLOP•2mo ago
No description
CDL
CDLOP•2mo ago
I don't even see the code for the left side column in my code lmao..
ἔρως
ἔρως•2mo ago
did you push all your changes?
CDL
CDLOP•2mo ago
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
vince
vince•2mo ago
AWS issue still maybe? 👀
CDL
CDLOP•2mo ago
No description
CDL
CDLOP•2mo ago
lol
No description
Rägnar O'ock
Rägnar O'ock•2mo ago
ya broke it
CDL
CDLOP•2mo ago
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.
Rägnar O'ock
Rägnar O'ock•2mo ago
you'll know the next time it breaks XD
CDL
CDLOP•2mo ago
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...
<template>
<header>
<h1>CDL Workout</h1>
</header>

<div class="add-workout-container">
<button @click="addWorkout">Add Workout</button>
</div>

<div class="workouts-wrapper">
<div v-if="workouts.length === 0" class="empty-state">
<p>You have no workouts yet.</p>
<p>Click Add Workout to create your first one.</p>
</div>

<div v-else>
<WorkoutItem
v-for="(workout, index) in workouts"
:key="workout.id"
:workout="workout"
@update:workout="($event) => (workouts[index] = $event)"
@remove="removeWorkout"
/>
</div>
</div>
</template>
<template>
<header>
<h1>CDL Workout</h1>
</header>

<div class="add-workout-container">
<button @click="addWorkout">Add Workout</button>
</div>

<div class="workouts-wrapper">
<div v-if="workouts.length === 0" class="empty-state">
<p>You have no workouts yet.</p>
<p>Click Add Workout to create your first one.</p>
</div>

<div v-else>
<WorkoutItem
v-for="(workout, index) in workouts"
:key="workout.id"
:workout="workout"
@update:workout="($event) => (workouts[index] = $event)"
@remove="removeWorkout"
/>
</div>
</div>
</template>
How does one have Add Workout button underneath the text if workouts.length === 0, but above the table if !workouts.length === 0?
Rägnar O'ock
Rägnar O'ock•2mo ago
with v-if just slap a v-if on it
CDL
CDLOP•2mo ago
I have one inside the text container, with the else being a wrapper on the component (wasn't working without it)
Rägnar O'ock
Rägnar O'ock•2mo ago
you can use template for v-if v-else and v-for if you don't want it to show up in the DOM
CDL
CDLOP•2mo ago
I templated inside my template, I think that's what you meant?
<template>
<header>
<h1>CDL Workout</h1>
</header>

<!-- Main View (if no workout exists) -->
<div v-if="workouts.length === 0" class="empty-state">
<p>You have no workouts yet.</p>
<p>Click Add Workout to create your first one.</p>

<div class="add-workout-center">
<button @click="addWorkout">Add Workout</button>
</div>
</div>

<!-- Main View (if a workout exists) -->
<template v-else>
<div class="add-workout-container">
<button @click="addWorkout">Add Workout</button>
</div>

<workout-item
v-for="(workout, index) in workouts"
:workout="workout"
@update:workout="($event) => (workouts[index] = $event)"
@remove="removeWorkout"
/>
</template>
</template>
<template>
<header>
<h1>CDL Workout</h1>
</header>

<!-- Main View (if no workout exists) -->
<div v-if="workouts.length === 0" class="empty-state">
<p>You have no workouts yet.</p>
<p>Click Add Workout to create your first one.</p>

<div class="add-workout-center">
<button @click="addWorkout">Add Workout</button>
</div>
</div>

<!-- Main View (if a workout exists) -->
<template v-else>
<div class="add-workout-container">
<button @click="addWorkout">Add Workout</button>
</div>

<workout-item
v-for="(workout, index) in workouts"
:workout="workout"
@update:workout="($event) => (workouts[index] = $event)"
@remove="removeWorkout"
/>
</template>
</template>
CDL
CDLOP•2mo ago
Better than nothing, for now. This is the view with no workouts
No description
CDL
CDLOP•2mo ago
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 👀
CDL
CDLOP•5w ago
the font makes me sad
No description
ἔρως
ἔρως•5w ago
that's because it doesn't fit
CDL
CDLOP•5w ago
I think it's very plain too, no? as in, the background in general
ἔρως
ἔρως•5w ago
do you want my honest opinion?
CDL
CDLOP•5w ago
Always 😄
ἔρως
ἔρως•5w ago
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
CDL
CDLOP•5w ago
Yeah I agree, that's what I'm trying to fix atm 😄 font + coloring
ἔρως
ἔρως•5w ago
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
Rägnar O'ock
Rägnar O'ock•5w ago
I wanna do a quick restyle... may I ? (imma do it anyway)
CDL
CDLOP•5w ago
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? 😄
ἔρως
ἔρως•5w ago
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
Rägnar O'ock
Rägnar O'ock•5w ago
what?!
No description
CDL
CDLOP•5w ago
huh?
ἔρως
ἔρως•5w ago
the 100%
CDL
CDLOP•5w ago
oh lol weird, I can't seem to center the footer text xD just sits slightly to the left
ἔρως
ἔρως•5w ago
probably extra whitespace or padding or something
CDL
CDLOP•5w ago
yeah no idea lol
No description
ἔρως
ἔρως•5w ago
without seeing it myself, im just guessing
CDL
CDLOP•5w ago
yeah I'll look into it tomorrow, I think the header already feels nicer, maybe similar with the footer, who knows
No description
ἔρως
ἔρως•5w ago
it looks better, but still, you're just coloring everything makes reading the table an infuriating irritating mess
CDL
CDLOP•5w ago
I'll reset the colors to variations of black/white/grey tomorrow and then look at what I can do with it
ἔρως
ἔρως•5w ago
not black do not use black if you need something dark, use an off-black like #222222
CDL
CDLOP•5w ago
gotcha Encountered another issue, I can't scroll 😄 alright I have a list of things to fix tomorrow
Kingpin
Kingpin•5w ago
Please don't center the text in the table, not like that anyways...
ἔρως
ἔρως•5w ago
the name does look weird like that
CDL
CDLOP•5w ago
exercise name is taking up way too much space in that table, should be much shorter
ἔρως
ἔρως•5w ago
your table is HUGE
CDL
CDLOP•5w ago
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
Kingpin
Kingpin•5w ago
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.
CDL
CDLOP•5w ago
maybe I need to reduce the max-width on the container
Kingpin
Kingpin•5w ago
The table looks okay, but ye there is to much room for the names.
CDL
CDLOP•5w ago
No description
Kingpin
Kingpin•5w ago
That seems a lot better, but you should look at examples of tables online to see how they do this.
ἔρως
ἔρως•5w ago
dude, just remove the background of the odd rows
CDL
CDLOP•5w ago
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
No description
Rägnar O'ock
Rägnar O'ock•5w ago
No description
Rägnar O'ock
Rägnar O'ock•5w ago
(I'm not great at making and using icons, I think they are too big)
CDL
CDLOP•5w ago
Oooooooooooooooooooooooooooo That's better
Kingpin
Kingpin•5w ago
Definitly to big, and kind of look like a color picker as well. But maybe that's just me.
CDL
CDLOP•5w ago
little tables, not 1 giant table across the screen
Rägnar O'ock
Rägnar O'ock•5w ago
probably better like this
No description
Kingpin
Kingpin•5w ago
But I do actually like the icons xd.
Rägnar O'ock
Rägnar O'ock•5w ago
the font I used is kinda fucked up as far as alignment and sizing goes
CDL
CDLOP•5w ago
you're gonna have to share how you did that so I can alter mine a bit, that does look a lot better haha
Kingpin
Kingpin•5w ago
Maybe a seperation line underneath the title and icon thing with an opacity or something?
Rägnar O'ock
Rägnar O'ock•5w ago
like dis ? I'm not a fan of rulers
No description
vince
vince•5w ago
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?
Rägnar O'ock
Rägnar O'ock•5w ago
it's very much corpo styled though (it's kinda my only style when it comes to UI XD
vince
vince•5w ago
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
Rägnar O'ock
Rägnar O'ock•5w ago
like this ?
No description
Kingpin
Kingpin•5w ago
Ye, sometimes you gotta see it in action before deciding if it can be used or not. I think I like it tho.
vince
vince•5w ago
Yea I actually love the dashed borders but I'm biased -- I've always liked the dashed style but no one ever uses them 😭
Rägnar O'ock
Rägnar O'ock•5w ago
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
vince
vince•5w ago
Are you using Outfit for the font?
Rägnar O'ock
Rägnar O'ock•5w ago
nah, it's a google font called Dongle which is a corean font XD
vince
vince•5w ago
One of these days I'm going to guess the font correctly 😂 Looks very much like Outfit
Rägnar O'ock
Rägnar O'ock•5w ago
hense the fucked up baseline
vince
vince•5w ago
https://fonts.google.com/specimen/Outfit Outfit is a bit more blocky actually
Rägnar O'ock
Rägnar O'ock•5w ago
https://fonts.google.com/specimen/Dongle I wanted one with rounded ends
vince
vince•5w ago
Yea it looks good! I like it, never saw this font before
Rägnar O'ock
Rägnar O'ock•5w ago
I really like how it looks in korean, too bad I have no idea what it says
No description
Rägnar O'ock
Rägnar O'ock•5w ago
what do you mean by that ?
CDL
CDLOP•5w ago
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
vince
vince•5w ago
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 👀
Kingpin
Kingpin•5w ago
Not meaning to step on any toes, but at this point are we really helping or steering CDL?
vince
vince•5w ago
Lol steering for sure, I'm just having fun he can take any suggestion he wants (or none) 😄
CDL
CDLOP•5w ago
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.
CDL
CDLOP•5w ago
Example:
No description
Rägnar O'ock
Rägnar O'ock•5w ago
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)
CDL
CDLOP•5w ago
As in, after the last exercise just have an empty input row?
Rägnar O'ock
Rägnar O'ock•5w ago
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
CDL
CDLOP•5w ago
I like the idea of that tbh, gets rid of the add exercise button, I do hate the buttons.
Rägnar O'ock
Rägnar O'ock•5w ago
and you can also have one inserted when hitting enter in one of the row's input
CDL
CDLOP•5w ago
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
Rägnar O'ock
Rägnar O'ock•5w ago
yup
CDL
CDLOP•5w ago
Adding it to the todo 👀
Rägnar O'ock
Rägnar O'ock•5w ago
(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 UI
CDL
CDLOP•5w ago
Never 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
Rägnar O'ock
Rägnar O'ock•5w ago
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 xD
CDL
CDLOP•5w ago
That 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 🤣
Rägnar O'ock
Rägnar O'ock•5w ago
yup there's no perfect UX, you can alway make it better but it gets harder each time you make it so
CDL
CDLOP•5w ago
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 😎
Kingpin
Kingpin•5w ago
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?
CDL
CDLOP•4w ago
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
ἔρως
ἔρως•4w ago
so, the everything?
CDL
CDLOP•4w ago
Yeah... that... Wee bit stuck but I have the 2x2 column in grid going at least lol
ἔρως
ἔρως•4w ago
that's something
CDL
CDLOP•4w ago
No description
CDL
CDLOP•4w ago
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/
ἔρως
ἔρως•4w ago
any help with centering the bloody footer would be greatly appreciated too!!
No description
ἔρως
ἔρως•4w ago
you can pick one of these: - remove max-width - specifically set this to have 100% width - center the contents of <footer>
Rägnar O'ock
Rägnar O'ock•4w ago
why do you have a margin and a gap ? there's like 5 km between the cards
No description
ἔρως
ἔρως•4w ago
he's adding new lanes to the highway of information
CDL
CDLOP•4w ago
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
Kingpin
Kingpin•4w ago
For the add workout, I suggest check-in your padding for the text.

Did you find this page helpful?