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

Merge Sidebar and Topbar Review - Meeds-io/MIPs#159 #4250

Merged
merged 64 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
ad13ba1
feat: Prepare Tobar and Sidebar Navigation Service - MEED-7776 - Meed…
boubaker Nov 20, 2024
823ec97
feat: Allow to configure Sidebar and Topbar in Mobile - MEED-7777 - M…
boubaker Nov 21, 2024
9341df9
feat: Disable Sidebar and Topbar settings button when not modified - …
boubaker Nov 21, 2024
01844da
feat: Add Sidebar Preview in Main settings UI - MEED-7777 - Meeds-io/…
boubaker Nov 21, 2024
68af24c
feat: Add Sidebar Item Actions - Meeds-io/MIPs#159
boubaker Nov 21, 2024
e6c8ae4
feat: Allow to add a site or a page - MEED-7792 - Meeds-io/MIPs#159
boubaker Nov 21, 2024
4092e94
feat: Allow to add Spaces in Sidebar Menus - MEED-7799 - Meeds-io/MIP…
boubaker Nov 22, 2024
8d54357
feat: Allow to Configure Spaces List in Left Menu - MEED-7799 - Meeds…
boubaker Nov 22, 2024
2bca817
feat: Allow to Configure a Link in Left Menu - MEED-7799 - Meeds-io/M…
boubaker Nov 22, 2024
c2eece6
feat: Allow to change Site or Page icon - MEED-7838 - Meeds-io/MIPs#1…
boubaker Nov 22, 2024
c8be345
feat: Add Help Labels in Sidebar Configuration UI - MEED-7836 - Meeds…
boubaker Nov 23, 2024
dabf786
feat: Add Default Spaces Link on startup - MEED-7833 - Meeds-io/MIPs#159
boubaker Nov 23, 2024
f30e9ac
feat: Add unit Test for Navbar & Topbar Backend - Meeds-io/MIPs#159
boubaker Nov 24, 2024
7643ba8
feat: Reduce Spacing between Sidebar items - Meeds-io/MIPs#159
boubaker Nov 24, 2024
18628e1
feat: Refactor Sidebar to introduce sidebar settings from admin UI - …
boubaker Nov 25, 2024
49be998
feat: Add Reduced Sidebar Menu Option - Meeds-io/MIPs#159 (#4203)
boubaker Nov 26, 2024
8d316ab
feat: Use Image for Sidebar Icon View - Meeds-io/MIPs#159
boubaker Nov 26, 2024
2a9c10b
feat: Improve Sidebar Style and UX - Meeds-io/MIPs#159
boubaker Nov 27, 2024
059d8ae
feat: Add Specific Order for Sidebar Space Templates Listing - MEED-7…
boubaker Nov 27, 2024
1c826e4
feat: Allow to display Sidebar Icon View until MD - MEED-7783 - Meeds…
boubaker Nov 27, 2024
30d385a
feat: Implement Sidebar Spaces List switch template - MEED-7790 - Mee…
boubaker Nov 27, 2024
a38ea6e
feat: Add unread and favorite filter in Second Level of Sidebar - MEE…
boubaker Nov 28, 2024
d05b68e
feat: Open Sidebar on click only - MEED-7788 - Meeds-io/MIPs#159
boubaker Nov 28, 2024
4e1f0c4
feat: Review Spaces Form Creation Drawer - MEED-7804 - Meeds-io/MIP#1…
boubaker Nov 29, 2024
9641472
feat: Add Shortcut to create Space from sidebar - MEED-7805 - Meeds-i…
boubaker Nov 29, 2024
3eb03e4
fix: Fix Autofocus on Space Form - MEED-7804 - Meeds-io/MIPs#159
boubaker Nov 29, 2024
4b94b29
fix: Fix Space Form Stepper Style - MEED-7804 - Meeds-io/MIPs#159
boubaker Nov 29, 2024
2d9832d
feat: Adjust Topbar Site and Company display switch config - MEED-778…
boubaker Nov 30, 2024
87ebd70
feat: Enhance Space Template Card UX in Space Form - MEED-7866 - Meed…
boubaker Nov 30, 2024
0111828
feat: Move Spaces List Link tp Second Drawer - MEED-7864 - Meeds-io/M…
boubaker Nov 30, 2024
d71ed80
feat: Apply Topbar Applications Sort defined from configuration - Mee…
boubaker Nov 30, 2024
00a1258
feat: Apply Allowed Sidebar Menu Modes rule from Admin UI - Meeds-io/…
boubaker Nov 30, 2024
705259d
feat: Rename Hamburger Menu to Sidebar Portlet - Meeds-io/MIPs#159
boubaker Dec 1, 2024
e02284f
feat: Review Sidebar Icons Size - MEED-7877 - Meeds-io/MIPs#159
boubaker Dec 1, 2024
53af282
feat: Close Sidebar on Click only when Hidden - MEED-7877 - Meeds-io/…
boubaker Dec 1, 2024
7d74a9b
fix: Enhance UX of Sidebar Ripple button opening second level drawer …
boubaker Dec 1, 2024
c2882e1
fix: Fix Space Template Choice Margins - MEED-7866 - Meeds-io/MIPs#159
boubaker Dec 3, 2024
9eac1e1
feat: Allow to enable/disable User Home button from Sidebar - MEED-78…
boubaker Dec 3, 2024
4160831
fix: Display Space creation button in Sidebar for allowed users only …
boubaker Dec 3, 2024
1762b69
fix: Fix display of Back button for Sites MD & SM in Sidebar Second L…
boubaker Dec 3, 2024
b5e3f6d
fix: Fix Refreshing Sidebar Configuration Settings - MEED-7892 - Meed…
boubaker Dec 3, 2024
bba8b4d
feat: Turn on Icon View of Sidebar when Tablet and Sticky Mode - MEED…
boubaker Dec 3, 2024
5e9df40
feat: Enhance Company Logo proportions display in Topbar and sidebar …
boubaker Dec 3, 2024
3c02401
feat: Downsize Space Avatar in Topbar - MEED-7887 - Meeds-io/MIPs#159…
boubaker Dec 3, 2024
0d8e4c6
feat: Display Full Company Name in Standalone Sites independently fro…
boubaker Dec 3, 2024
294ca8f
feat: Display Page icon and name when meta's page - MEED-7890 - Meeds…
boubaker Dec 3, 2024
e5387be
feat: Review Topbar Admin Options - MEED-7891 - Meeds-io/MIPs#159 (#4…
boubaker Dec 3, 2024
0c80003
feat: Review Favorite Tab Placeholder Label - MEED-7852 - Meeds-io/MI…
boubaker Dec 3, 2024
b560a88
fix: Fix External Feature Flag computing outside Spaces page - MEED-7…
boubaker Dec 3, 2024
095fd69
feat: Display Shared layout on sites included in Sidebar only - MEED-…
boubaker Dec 4, 2024
8dc4dd7
fix: Align Sidebar Config UI Items Icon - MEED-7895 - Meeds-io/MIPs#1…
boubaker Dec 4, 2024
a1eab54
feat: Display Badge over Space Avatar in sidebar Icon View - MEED-789…
boubaker Dec 4, 2024
7d511f2
fix: Refresh Notification Extensions when loading is deferred - MEED-…
boubaker Dec 4, 2024
5cb3267
feat: Enhance Mobile UX when clicking on Sidebar Spaces - MEED-7863 -…
boubaker Dec 4, 2024
566acf1
feat: Allow to hide Company Logo in Mobile by Settings - MEED-7899 - …
boubaker Dec 4, 2024
c457ee6
fix: Fix Sidebar Tooltips - MEED-7901 - Meeds-io/MIPs#159 (#4235)
boubaker Dec 4, 2024
0e8a9e7
feat: Save Sites Display Order when Saving Sidebar - MEED-7902 - Meed…
boubaker Dec 5, 2024
e5dc416
feat: Allow choosing whether to display spaces in Sidebar in Mobile -…
boubaker Dec 6, 2024
c71d31b
feat: Allow to access Sidebar Config Saving options independently fro…
boubaker Dec 6, 2024
e075070
feat: Review Sidebar Spaces Options - MEED-7907 - Meeds-io/MIPs#159 (…
boubaker Dec 6, 2024
57dc263
fix: Display Spaces Items in Preview only when Member of spaces - MEE…
boubaker Dec 6, 2024
c7a4ddd
fix: Fix managing dynamic application ids - Meeds-io/MIPs#159
boubaker Dec 7, 2024
2b42af0
fix: Fix License Header - Meeds-io/MIPs#159
boubaker Dec 7, 2024
cec2456
fix: Improve External Link Security - Meeds-io/MIPs#159
boubaker Dec 8, 2024
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
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
/*
/**
* This file is part of the Meeds project (https://meeds.io/).
*
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.navigation.constant;

import * as spaceTemplateService from '../space-templates-management/js/SpaceTemplateService.js';

if (!Vue.prototype.$spaceTemplateService) {
window.Object.defineProperty(Vue.prototype, '$spaceTemplateService', {
value: spaceTemplateService,
});
public enum SidebarItemType {
PAGE, SITE, SEPARATOR, SPACES, SPACE_TEMPLATE, SPACE, LINK;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.navigation.constant;

public enum SidebarMode {
HIDDEN, ICON, STICKY;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.navigation.constant;

public enum TopbarItemType {
APP, LINK;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.navigation.model;

import lombok.Data;

@Data
public class NavigationConfiguration implements Cloneable {

private TopbarConfiguration topbar;

private SidebarConfiguration sidebar;

private final long lastModified;

public NavigationConfiguration() {
this.lastModified = System.currentTimeMillis();
}

public NavigationConfiguration(TopbarConfiguration topbar, SidebarConfiguration sidebar) {
this.topbar = topbar;
this.sidebar = sidebar;
this.lastModified = System.currentTimeMillis();
}

public NavigationConfiguration(TopbarConfiguration topbar,
SidebarConfiguration sidebar,
long lastModified) {
this.topbar = topbar;
this.sidebar = sidebar;
this.lastModified = lastModified;
}

@Override
public NavigationConfiguration clone() { // NOSONAR
return new NavigationConfiguration(topbar == null ? null : topbar.clone(),
sidebar == null ? null : sidebar.clone(),
lastModified);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.navigation.model;

import java.util.ArrayList;
import java.util.List;

import io.meeds.social.navigation.constant.SidebarMode;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SidebarConfiguration implements Cloneable {

private boolean allowUserCustomHome;

private SidebarMode defaultMode;

private SidebarMode userMode;

private List<SidebarMode> allowedModes;

private List<SidebarItem> items;

@Override
public SidebarConfiguration clone() { // NOSONAR
return new SidebarConfiguration(allowUserCustomHome,
defaultMode,
userMode,
allowedModes == null ? null : new ArrayList<>(allowedModes),
items == null ? null : items.stream().map(SidebarItem::clone).toList());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.navigation.model;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import io.meeds.social.navigation.constant.SidebarItemType;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SidebarItem implements Cloneable {

private String name;

private String url;

private String target;

private String avatar;

private String icon;

private SidebarItemType type;

private List<SidebarItem> items;

private Map<String, String> properties;

public SidebarItem(SidebarItemType type) {
this.type = type;
}

@Override
public SidebarItem clone() { // NOSONAR
return new SidebarItem(name,
url,
target,
avatar,
icon,
type,
items == null ? null : items.stream().map(SidebarItem::clone).toList(),
properties == null ? null : new HashMap<>(properties));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.navigation.model;

import java.util.Map;
import java.util.Objects;

import org.apache.commons.lang3.StringUtils;

import io.meeds.social.navigation.constant.TopbarItemType;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TopbarApplication {

public static final String CONTENT_ID_PROP_NAME = "contentId";

private String id;

private String name;

private String description;

private String icon;

private TopbarItemType type;

private boolean enabled;

private boolean mobile;

private Map<String, String> properties;

@Override
public boolean equals(Object o) {
if (!(o instanceof TopbarApplication app)) {
return false;
} else if (StringUtils.equals(id, app.getId())) {
return true;
} else if (properties == null || app.getProperties() == null) {
return false;
} else {
return StringUtils.equals(properties.get(CONTENT_ID_PROP_NAME),
app.getProperties().get(CONTENT_ID_PROP_NAME));
}
}

@Override
public int hashCode() {
return Objects.hash(properties == null ? id :
StringUtils.firstNonBlank(properties.get(CONTENT_ID_PROP_NAME), id));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.navigation.model;

import java.util.ArrayList;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TopbarConfiguration implements Cloneable {

private boolean displayCompanyName;

private boolean displaySiteName;

private boolean displayMobileCompanyLogo;

private List<TopbarApplication> applications;

@Override
public TopbarConfiguration clone() { // NOSONAR
return new TopbarConfiguration(displayCompanyName,
displaySiteName,
displayMobileCompanyLogo,
new ArrayList<>(applications));
}

}
Loading
Loading