feat: improve user assignments via quick add magic #3348

Merged
konrad merged 18 commits from feature/better-user-search-assignees into main 2023-06-05 15:03:16 +00:00
Showing only changes of commit 6a15489610 - Show all commits

View File

@ -18,6 +18,9 @@
</BaseButton>
</span>
</template>
<template #searchResult="{option: user}">
<user :avatar-size="24" :show-username="true" :user="user" class="user-search-result"/>
dpschen marked this conversation as resolved Outdated

Use a prop here and change user so that it doesn't add a margin.

Reason: If we want to remove the margin in general from the user component later (which we should and I think I have done that already in some branch) then it will be much easier if we don't have classes that have dependencies that we are not aware of.

Sum up:

  • setting margin from outside of components is fine
  • unsetting margin from outside if there is already one from inside (which shouldn't be there in the first place) is not fine.
Use a prop here and change user so that it doesn't add a margin. Reason: If we want to remove the margin in general from the user component later (which we should and I think I have done that already in some branch) then it will be much easier if we don't have classes that have dependencies that we are not aware of. Sum up: - setting margin from outside of components is fine - unsetting margin from outside if there is already one from inside (which shouldn't be there in the first place) is not fine.

My first gut-reaction was, "but the user component is used a lot! That's quite a bit of effort to change it everywhere!". Then I started looking into and as it turns out, there are only 3 places where the margin from the component is not overridden from the outer component. That made it easier and kind of proved your point :)

My first gut-reaction was, "but the user component is used a lot! That's quite a bit of effort to change it everywhere!". Then I started looking into and as it turns out, there are only 3 places where the margin from the component _is not_ overridden from the outer component. That made it easier and kind of proved your point :)
</template>
</Multiselect>
</template>
@ -146,4 +149,8 @@ async function findUser(query: string) {
height: 18px;
z-index: 100;
}
.user-search-result {
margin: 0;
}
</style>