-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
[RELEASE] AdminLTE v4 beta3 #3692
Comments
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
Wahoo! Very exciting. Obviously, lots more to do (login pages, right hand sidebar, etc.), but great to see that this is starting. It appears to me that the BS5 changes from BS4 are not as significant as the BS3 to BS4 changes, dropping jquery of course is a big one. And changes to the data attributes to include -bs. Do you think that getting the demo to work is going to be mostly HTML to change to support bs5, or changes to the AdminLTE CSS and JS files? |
Do we have to compile using npm? Will there be compiled CSS/JS in the future? |
Same as AdminLTE v3 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Thanks @REJack. I will build myself and see where I can hop in. Do you have any plans to make version 3 compatible with Bootstrap 5? Or is it 3.x => BS4, 4.x => BS5? |
v3 will stuck on BS4 |
Great, too messy, especially without jQuery. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
In case it is helpful to anyone else I will be maintaining a distribution repo for version 4 until there is an official release: https://github.com/MGatner/adminlte4 |
This comment was marked as outdated.
This comment was marked as outdated.
Just Released adminlte-4.0.0-beta2 |
in next release i have decided to release compiled dist folder also any suggestions |
Is there any chance that |
|
First, delighted to see this moving! I've started migrating one of my projects to 4.0.0-beta2 today, and I'm happy so far, good job! I use my own theme colors and after some tweaking and updating I got this (#2687) method working on the new build system. |
Is there a CDN available? |
Hello, I am working with AdminLte 4.0.0-beta2 in vuejs 3.5. But I have a problem when loading the Adminlte scripts, since the sidebar toggle does not work, for example. Can you explain to me if I'm doing something wrong or what? This would be the reference source code. import 'bootstrap' That is when installing the package: npm i admin-lte ` |
In AdminLTE v4 Beta 3, we plan to include the compiled dist folder based on valuable feedback received. Do you have any suggestions? |
I am hoping that once it is out, in an easily usable format that people feel comfortable using then we can start getting some good feedback. But to be honest I feel like a lot of the base for this template have moved on due to how long it has taken to come out. I hope I am wrong but based on the comments over the last few years I think it has lost some people. I hope we can bring them back, but time will tell. The hard part with anything technical is that it all moves so fast, and even more so now these days. This project needs more contributors to keep it moving at the speed of technology. Can't wait for some of the releases to be put out and start seeing some feedback from users. It has been a while since I brought any changes into my project using it as I added custom code to handle things I specifically needed and will have to go back and try and remember what all that was. Don't look forward to that and really don't have time to do it as I have to get the product release in a few months. |
Not at the moment. But thank you very much. |
Ok. Thank you verymuch. |
Release Please Test and Give Feedback |
The only thing that I have ran into, that has really been there the whole time is that side bar state is not remembered. So if I CTRL-R to refresh the page and the sidebar was not showing after the refresh it will be showing again. It will also show again if I change the size of the browser window. Pretty much anything that makes the page refresh/redraw will load the page like it is new and the sidebar will be showing again. I would think that we could use a tag in the local browser storage to save the sidebar state and read it on page load so that it loads the last state. This would also work when a user returns to the site even after the browser is closed. When they come back the state would be in the browser storage to be read and boom the state the user last had it as would be recognized and displayed accordingly. Maybe I am the only one that wants this feature? |
When following the instructions to build the site and test there are a lot of
|
The version 3.x.x branches contains a folder |
@semanticfire Because which plugins usually take up a lot of space, and cleaning up excess files is also a tedious and wide-ranging task, CDN is used in v4 to introduce and demonstrate demos |
|
in other words, I need to manually include them, or copy the process in the v3 build for my own project. |
I save it to the localStorage. Not a great solution, but it was good enough to fix what I cared about. window.onload = function () {
// Stores 'sidebar-' classes to localStorage
function storeSidebarToLocalStorage() {
const sidebarClasses = [...document.body.classList]
.filter(className => className.startsWith('sidebar-') && className !== 'sidebar-is-hover');
localStorage.setItem('sidebarData', JSON.stringify(sidebarClasses));
}
// Replaces 'sidebar-' classes with those from localStorage
function replaceSidebarFromLocalStorage() {
const storedSidebarData = JSON.parse(localStorage.getItem('sidebarData')) || [];
// Remove existing 'sidebar-' classes
[...document.body.classList]
.filter(className => className.startsWith('sidebar-'))
.forEach(className => document.body.classList.remove(className));
// Add classes from localStorage
document.body.classList.add(...storedSidebarData);
}
// Attach click event to links with data-lte-toggle attribute
document.querySelectorAll('[data-lte-toggle]').forEach(link => {
link.addEventListener('click', storeSidebarToLocalStorage);
});
// Replace sidebar- classes on page load
replaceSidebarFromLocalStorage();
}; |
Question about the state of the sidebar and loading it. Since the sidebar is now loaded with the page always assuming the menu is expanded since there is no way to store the state of the sidebar menu. This seems fine because no animation happens as the page loads as one would expect it to. Now if we add the ability to save the sidebar menu state and we load the page with the state of the sidebar collapsed, the page flashes due to the sidebar loading expanding then closing. I feel like the default should be the sidebar is closed, and it should expand if the state is expanded. This would prevent the flash on page loads and look cleaner. I would fix this myself, but honestly, after spending some time looking, I cannot find where this is happening at. If someone knows and can guide me in the right direction, then I will fix it on my end for my purposes. But I am also curious as to how others feel about how this load state should be? Should the page load with the menu collapsed and animate open or load expanded and animate to closed on page load? Thanks again for the great job on the project and any help you can provide @danny007in! |
So, this is what I did to make this work and if acceptable I can make a PR to add it to the project. All changes are made in the push-menu.ts file. First add this const at the top of the file with the other constants. This is the storage key used in the browser. const STORAGE_KEY_SIDEBAR_STATE = 'lte.sidebar.state' Next after saveSidebarState() {
if (document.body.classList.contains(CLASS_NAME_SIDEBAR_OPEN)) {
localStorage.setItem(STORAGE_KEY_SIDEBAR_STATE, CLASS_NAME_SIDEBAR_OPEN)
} else {
localStorage.setItem(STORAGE_KEY_SIDEBAR_STATE, CLASS_NAME_SIDEBAR_COLLAPSE)
}
}
loadSidebarState() {
let storedSidebarState = localStorage.getItem(STORAGE_KEY_SIDEBAR_STATE)
if (storedSidebarState === null) {
storedSidebarState = CLASS_NAME_SIDEBAR_OPEN
}
if (storedSidebarState === CLASS_NAME_SIDEBAR_COLLAPSE) {
this.collapse()
} else {
this.expand()
}
} Now right below we need to modify the toggle() {
if (document.body.classList.contains(CLASS_NAME_SIDEBAR_COLLAPSE)) {
this.expand()
this.saveSidebarState()
} else {
this.collapse()
this.saveSidebarState()
}
}
init() {
this.addSidebarBreakPoint()
this.loadSidebarState()
} Now when this typescript/javascript is called with the Like I said, if this is an acceptable solution let me know and I will create a PR for it to be added to the project. |
I went ahead and added the sidebar menu state code as a PR so that it can be added to the base code should the code owners accept it. |
The sidebar Might as well add the other items on the header menu bar that are more like buttons like the full screen button. |
@mbdrasel I use it here AdminLTE.Core and working fine. It need to restore client libraries first |
(Beta)-Release is online, you can install it with
npm install admin-lte@latest
ornpm install [email protected]
.Online https://adminlte-v4.netlify.app
Check https://github.com/ColorlibHQ/AdminLTE
Install
npm i
for this you need Node,jsto build
npm run production
to run
npm run dev
then open go to http://localhost:3000/
then give some idea, or contribute 👍🏼
The text was updated successfully, but these errors were encountered: