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

Conversation

peoray
Copy link
Contributor

@peoray peoray commented Oct 17, 2023

Changes proposed ✍️

Fixes #1382

What

🤖 Generated by Copilot at 1661a46

Added scoped style to form-item.vue component to increase spacing between error messages and form inputs. This improves the user interface and resolves issue #12.

🤖 Generated by Copilot at 1661a46

form-item styled
margin for error message
autumn leaves more space

Why

How

🤖 Generated by Copilot at 1661a46

  • Add scoped style to form-item.vue component to increase margin between error message and next form item (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

Comment on lines 114 to 116
div.is-error {
margin-bottom: 40px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we do this in the Activity form component?
I'm afraid that with this change, it will affect all form-items throughout the app which can cause some unexpected visual changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in the parent form div element for each field, the class appears twice or thrice in the case of the isError class
<div class="el-form-item mb-4 mb-4"> or <div class="el-form-item isError isError isError">

any idea why this is happening?

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting 🤔
No, not sure why it is happening, also not being able to see it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll send a screenshot when I can. Strange that's happening only for me. Although the code should as expected baring this occurrence, it doesn't really affect anything

Comment on lines +391 to +394
<style scoped>
.isError {
margin-bottom: 40px;
}
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;
}

@@ -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.

@joanagmaia
Copy link
Contributor

Hey @peoray any updates here? If you need any help from me let me know 😄

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

Successfully merging this pull request may close these issues.

[C-2166] Inconsistent spacing in error messages for create activity fields
2 participants