Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent spacing in error messages for create activity fields #1704

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<template #content>
<div class="-mt-4">
<app-form-item
class="mb-4"
:class="[$v.member.$errors.length ? 'isError' : 'mb-4']"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be mb-8, the message is still to close to the bottom field.

label="Contact"
:validation="$v.member"
:required="true"
Expand Down Expand Up @@ -50,6 +50,7 @@

<app-form-item
class="mb-4"
:class="[$v.datetime.$errors.length ? 'isError' : 'mb-4']"
label="When"
:validation="$v.datetime"
:required="true"
Expand All @@ -72,6 +73,7 @@

<app-form-item
class="mb-4"
:class="[$v.activityType.$errors.length ? 'isError' : 'mb-4']"
label="Activity type"
:validation="$v.activityType"
:required="true"
Expand Down Expand Up @@ -385,3 +387,9 @@ export default {
name: 'AppActivityFormDrawer',
};
</script>

<style scoped>
.isError {
margin-bottom: 40px;
}
Comment on lines +391 to +394
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed? Since you are already applying the classes on top?
Also, instead of adding the above :class="[$v.activityType.$errors.length ? 'isError' : 'mb-4']" to each form item, would it be better to add to the <style scoped> the following?

.el-form-item.is-error {
   @apply mb-8;
}

</style>
Loading