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: uses the new <DropdownMenu /> component #569

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .discourse-compatibility
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
< 3.3.0.beta2-dev: b796ae3fcc89b48cf777de5ee3a4c21aada9271e
< 3.3.0.beta1-dev: 56b0de3896361b6a87523537c8f5b450d2fe0807
3.2.0: 33c43ca51ac7b7baa8a309a269dcf8685b8bd638
< 3.2.0.beta2-dev: ac930c509e2a5b0c37b84bcea28d332e686add95
Expand Down
41 changes: 20 additions & 21 deletions assets/javascripts/discourse/components/assigned-to-post.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Component from "@glimmer/component";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import DButton from "discourse/components/d-button";
import DropdownMenu from "discourse/components/dropdown-menu";
import icon from "discourse-common/helpers/d-icon";
import i18n from "discourse-common/helpers/i18n";
import DMenu from "float-kit/components/d-menu";
Expand Down Expand Up @@ -38,27 +39,25 @@ export default class AssignedToPost extends Component {
{{/if}}
</a>

<DMenu @icon="ellipsis-h" class="btn-flat more-button">
<div class="popup-menu">
<ul>
<li>
<DButton
@action={{this.unassign}}
@icon="user-plus"
@label="discourse_assign.unassign.title"
class="popup-menu-btn"
/>
</li>
<li>
<DButton
@action={{this.editAssignment}}
@icon="group-plus"
@label="discourse_assign.reassign.title_w_ellipsis"
class="popup-menu-btn"
/>
</li>
</ul>
</div>
<DMenu @icon="ellipsis-h" class="btn-flat more-button" @autofocus={{true}}>
<DropdownMenu as |dropdown|>
<dropdown.item>
<DButton
@action={{this.unassign}}
@icon="user-plus"
@label="discourse_assign.unassign.title"
class="popup-menu-btn"
/>
</dropdown.item>
<dropdown.item>
<DButton
@action={{this.editAssignment}}
@icon="group-plus"
@label="discourse_assign.reassign.title_w_ellipsis"
class="btn-transparent"
/>
</dropdown.item>
</DropdownMenu>
</DMenu>
</template>
}
Loading