>();
+
const changeSetDropdownOptions = computed(() => {
- return [
+ const options = [
..._.map(openChangeSets.value, (cs) => ({ value: cs.id, label: cs.name })),
- { value: "NEW", label: "+ Create new change set" },
+ // { value: "NEW", label: "+ Create new change set" },
];
+ return options;
+});
+
+const changeSetSearchFilteredOptions = computed(() => {
+ const searchString = dropdownMenuRef.value?.searchString;
+
+ if (!searchString || searchString === "") {
+ return changeSetDropdownOptions.value;
+ }
+
+ return changeSetDropdownOptions.value.filter(
+ (option) =>
+ option.label.toLocaleLowerCase().includes(searchString) ||
+ option.value.toLocaleLowerCase().includes(searchString),
+ );
});
const router = useRouter();
@@ -219,7 +254,6 @@ async function onCreateChangeSet() {
const createReq = await changeSetsStore.CREATE_CHANGE_SET(
createChangeSetName.value,
);
- createChangeSetName.value = changeSetsStore.getGeneratedChangesetName();
if (createReq.result.success) {
// reusing above to navigate to new change set... will probably clean this all up later
diff --git a/app/web/src/components/layout/navbar/Collaborators.vue b/app/web/src/components/layout/navbar/Collaborators.vue
index b05a82fb2a..146d19cd91 100644
--- a/app/web/src/components/layout/navbar/Collaborators.vue
+++ b/app/web/src/components/layout/navbar/Collaborators.vue
@@ -49,7 +49,7 @@
@click="openMoreUsersPopover"
>
- +{{ moreUsersNumber }}
+
@@ -121,7 +121,17 @@ export type UserInfo = {
const moreUsersPopoverRef = ref();
const moreUsersButtonRef = ref();
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
+const testUsers = (amount = 10) => {
+ return Array.from(Array(amount).keys()).map((i) => ({
+ name: `test user ${i}`,
+ }));
+};
+
const users = computed(() => {
+ // Uncomment this line when you need to see users in the Collaborators widget for testing
+ // return testUsers();
+
const list = [] as UserInfo[];
for (const user of _.values(presenceStore.usersById)) {
list.push({
@@ -217,7 +227,6 @@ const moreUsersTooltip = computed(() => {
});
const width = computed(() => {
- windowResizeHandler();
if (showOneIcon.value || sortedUsers.value.length === 1) {
return "w-8";
} else if (sortedUsers.value.length < 3) {
@@ -233,23 +242,22 @@ const openMoreUsersPopover = () => {
moreUsersPopoverRef.value.open();
};
-const showOneIcon = ref(false);
+const windowWidth = ref(window.innerWidth);
const windowResizeHandler = () => {
- if (window.innerWidth < 900) {
- showOneIcon.value = true;
- } else {
- showOneIcon.value = false;
- }
+ windowWidth.value = window.innerWidth;
};
onMounted(() => {
+ windowResizeHandler();
window.addEventListener("resize", windowResizeHandler);
});
onBeforeUnmount(() => {
window.removeEventListener("resize", windowResizeHandler);
});
+const showOneIcon = computed(() => windowWidth.value < 700);
+
const filterString = ref("");
const filterStringCleaned = computed(() => {
if (!moreUsersPopoverRef.value.isOpen) return "";
diff --git a/app/web/src/components/layout/navbar/Navbar.vue b/app/web/src/components/layout/navbar/Navbar.vue
index 3128bca709..c2a1b75772 100644
--- a/app/web/src/components/layout/navbar/Navbar.vue
+++ b/app/web/src/components/layout/navbar/Navbar.vue
@@ -1,6 +1,12 @@