mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-04-19 04:50:33 +00:00
Fixes #1529. This adds an "Add member" button to the list of members of an organization, offering a more intuitive way to add a user to an organization (instead of going through the list of teams). This follows the design proposed in #1529. This PR can already be reviewed as such, but I plan to work on follow-up improvements: - adding a confirmation dialog when adding the new member to the "Owners" team, since they get absolute rights on the org - adding a text input to filter the list of teams, making it easier to select the desired teams when there are many of them - potentially, improving the team creation link so that it brings the user back to the modal dialog once the team is created (but I'm not sure there's a ton of value behind this added complexity, since currently, creating a team will lead the user to the team page, which is a good place to add the member to the team) This new way of adding members does not support issuing email invites, since we decided in #9884 that the invite feature hasn't got good enough of a UX to advertise it yet. Following [this discussion](https://codeberg.org/forgejo/discussions/issues/441), I am planning to work on enabling invites everywhere (potentially even making it the default). ## Checklist ### Tests for Go changes - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I ran... - [x] `make pr-go` before pushing ### Tests for JavaScript changes - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [x] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation I plan to update https://docs.codeberg.org/collaborating/create-organization/#people once we are ready to take final screenshots of the feature. ### Release notes - [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change. - [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change. ### Screenshots <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - Features - [PR](https://codeberg.org/forgejo/forgejo/pulls/11848): <!--number 11848 --><!--line 0 --><!--description IkFkZCBtZW1iZXIiIGJ1dHRvbiBpbiBvcmcgbWVtYmVycyBsaXN0-->"Add member" button in org members list<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11848 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org> Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu> Co-committed-by: Antonin Delpeuch <antonin@delpeuch.eu>
209 lines
4.1 KiB
CSS
209 lines
4.1 KiB
CSS
.organization .head .ui.header .ui.right {
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.organization.new.org form {
|
|
margin: auto;
|
|
}
|
|
|
|
.organization.new.org form .ui.message {
|
|
text-align: center;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.organization.new.org form {
|
|
width: 800px !important;
|
|
}
|
|
.organization.new.org form .header {
|
|
padding-left: 280px !important;
|
|
}
|
|
.organization.new.org form .inline.field > label {
|
|
text-align: right;
|
|
width: 250px !important;
|
|
word-wrap: break-word;
|
|
}
|
|
.organization.new.org form .help {
|
|
margin-left: 265px !important;
|
|
}
|
|
.organization.new.org form .optional .title {
|
|
margin-left: 250px !important;
|
|
}
|
|
.organization.new.org form .inline.field > input,
|
|
.organization.new.org form .inline.field > textarea {
|
|
width: 50%;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 767.98px) {
|
|
.organization.new.org form .optional .title {
|
|
margin-left: 15px;
|
|
}
|
|
.organization.new.org form .inline.field > label {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.organization.new.org form .header {
|
|
padding-left: 0 !important;
|
|
text-align: center;
|
|
}
|
|
|
|
.page-content.organization #org-info {
|
|
overflow-wrap: anywhere;
|
|
flex: 1;
|
|
}
|
|
|
|
.page-content.organization #org-info .org-title {
|
|
display: flex;
|
|
column-gap: 1rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.page-content.organization #org-info .org-title h1 {
|
|
margin: 0;
|
|
font-size: 2.5rem;
|
|
}
|
|
|
|
@media (max-width: 767.98px) {
|
|
.page-content.organization #org-info .org-header {
|
|
flex-direction: column;
|
|
margin-bottom: 1rem;
|
|
}
|
|
.page-content.organization #org-info .org-title {
|
|
flex-wrap: wrap;
|
|
width: 100%;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
}
|
|
|
|
.page-content.organization #org-info .desc {
|
|
font-size: 16px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.page-content.organization #org-info .meta {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.page-content.organization .ui.top.header .ui.right {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.page-content.organization.members .list {
|
|
display: grid;
|
|
grid-template-columns: minmax(min-content, auto) 1fr fit-content(100%) fit-content(100%);
|
|
color: var(--color-text-light-2);
|
|
|
|
.divider {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
/* Username (+display name) use header */
|
|
h3 {
|
|
margin: 0;
|
|
font-size: 16px;
|
|
font-weight: var(--font-weight-semibold);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
.actions {
|
|
display: contents;
|
|
}
|
|
|
|
.link-action, .delete-button {
|
|
align-self: start;
|
|
}
|
|
|
|
a:has(img) {
|
|
margin-inline-end: 0.5rem;
|
|
}
|
|
|
|
.delete-button {
|
|
margin-inline-start: var(--button-spacing);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 767.98px) {
|
|
.page-content.organization.members .list {
|
|
/* Place both buttons in one column */
|
|
grid-template-columns: minmax(min-content, auto) 1fr fit-content(100%);
|
|
|
|
.actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--button-spacing);
|
|
}
|
|
|
|
.link-action, .delete-button {
|
|
width: 100%;
|
|
margin: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.page-content.organization .teams .item {
|
|
padding: 10px 15px;
|
|
}
|
|
|
|
.page-content.organization .members .ui.avatar {
|
|
width: 48px;
|
|
height: 48px;
|
|
margin-right: 5px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.organization.invite #invite-box {
|
|
margin: 50px auto auto;
|
|
width: 500px !important;
|
|
}
|
|
|
|
.organization.invite #invite-box #search-user-box input {
|
|
margin-left: 0;
|
|
width: 300px;
|
|
}
|
|
|
|
.organization.invite #invite-box .ui.button {
|
|
margin-left: 5px;
|
|
margin-top: -3px;
|
|
}
|
|
|
|
.organization.invite .ui.avatar {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.organization.teams .detail .item {
|
|
padding: 10px 15px;
|
|
}
|
|
|
|
.organization.teams .detail .item:not(:last-child) {
|
|
border-bottom: 1px solid var(--color-secondary);
|
|
}
|
|
|
|
.organization.teams .repositories .item,
|
|
.organization.teams .members .item {
|
|
padding: 10px 19px;
|
|
}
|
|
|
|
.organization.teams .repositories .item:not(:last-child),
|
|
.organization.teams .members .item:not(:last-child) {
|
|
border-bottom: 1px solid var(--color-secondary);
|
|
}
|
|
|
|
.organization.teams .repositories .item .button,
|
|
.organization.teams .members .item .button {
|
|
padding: 9px 10px;
|
|
margin: 0;
|
|
}
|
|
|
|
.org-team-navbar .active.item {
|
|
background: var(--color-box-body) !important;
|
|
}
|
|
|
|
#add-member-modal .team-list {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|