Closed stephencmorton closed 5 months ago
If you finish the migration I will publish it.
If you are professional programmer I am sure you can follow the build guide :) https://github.com/mistic100/jQuery-QueryBuilder#build
Great, I'll finish the work then. Thanks.
Building is difficult because this uses nodejs-legacy and no amount of coercing will get it to build in a modern Ubuntu environment. I'll try in a legacy nodejs container. (And if you build it with non-legacy nodejs, it results in a sea of errors.)
Okay I didn't realize the stack was so outdated.
Unfortunately I have no will to spend time working on this. If the changes are simple enough I will hack into to dist files directly, otherwise....
I can get it to build (npm install; grunt
) in a container with an older node version (using node10 or node12 e.g. circleci/node:erbium-bullseye-browsers-legacy from dockerhub) but I cannot yet pass the unit tests grunt test --force
on the pristine-without-my-changes dev
or master
branches. I will keep trying.
(Re-posting same comment as before that I accidentally posted from the wrong account.)
Don't try too long, the unit tests are broken since years.
I spend this morning reworking the dev tools, not more outdated dev dependencies and it works on Node 16 (probably higher)
Beware I removed doT.js dependencie and modified the templates.
I was just rebasing on the latest. This is not 100% yet.
Hi @stephencmorton - I just wondered how this is going - would some sponsorship help to get it over the line?
Summer holidays and family things mostly. I'll see if I can get back to this. Sponsorship other than getting my job to give me more holiday, or my kids to be less work, is not needed. But thanks.
I've got it working. I submit it for approval/inclusion.
I did have to comment out the bootbox support. It's a NPM/Javascript issue that I assume is simple for somebody who knows more about this area than I do. "module" is not defined
.
It's all a bit thorny with all the NPM inclusions and a lot of other modules are still working on their Bootstrap5 support too.
Thanks for your efforts on this @stephencmorton (and @mistic100!), much appreciated. Also happy to sponsor if there's an option to do so ❤️
Thanks again for this @stephencmorton - great work.
I'm just working out what (ideally) needs to be done before this is merged (and I may have someone who can help if needed):
Hi @abeverley,
I think that's about it, other than a general "give it all a good code review and test and fix/improve anything you find". (One definite area too look at is JS packaging: I don't really understand the implications of different packaging methods like commonjs/module/ES6.)
To be honest, I do not see any point in offering backwards compatibility beyond adding to the documentation a section about Bootstrap 3 support being available by using release 2.7.0 and below.
I believe I've taken this as far as my experience/skills will allow so I'd love it if you or @mistic100 could finish any remaining 5% to get it published.
I carefully made separate commits for each "major area" of change, so for instance, if somebody decided that the way I changed the icons was not the desired way forward, it would be easy to redo just that one commit.
I agree backward compatibility is not needed. I can publish as V3 but I cannot test it. Do any of you want to be maintainer of the project to be autonomous on the BT5 support ?
I have tested this using yarn
and yarn run serve
https://github.com/mistic100/jQuery-QueryBuilder/assets/2040842/67a8bada-3e9d-4335-b54c-06de7bf1b519
https://github.com/mistic100/jQuery-QueryBuilder/assets/2040842/b7f6cf9a-7234-48bb-aad7-580255ce5ef1
yarn
. I think the yarn.lock
file is messed up. git checkout dev yarn.lock
and yarn
sorts it. The fixed file needs committing to this branch.I'm not sure if it works with yarn anymore. I believe Damien suggested I run npm run build
and npm run serve
.
(The documentation in this fork was updated to reflect that. https://github.com/stephencmorton/jQuery-QueryBuilder/tree/dev-bootstrap-5#developement )
@stephencmorton ah ok, in that case perhaps we need to get rid of yarn.lock
and commit a package-lock.json
There should not be any difference, NPM and Yarn install there dependencies the same way in the same location. and "npm run" and "yarn run" are strictly identical
but a major dependencies upgrade it might be useful to remove the lock file and recreate it for good
That could very well be. As I've confessed, npm/js is not my area of expertise.
I had pointed out that it was not possible to build and Damien updated some of it to work with a newer Node version. He'd tested to Node 16, I believe so I never tried building on anything higher than 16 either. (Built in a docker.)
I have tested this using
yarn
andyarn run serve
Issues
* [ ] When i first cloned this branch i had trouble with `yarn`. I think the `yarn.lock` file is messed up. `git checkout dev yarn.lock` and `yarn` sorts it. The fixed file needs committing to this branch. * [ ] The default theme looks a bit broken / not central compared to before * [ ] Checkboxes have broken icons (Still using Glyphicons here https://github.com/stephencmorton/jQuery-QueryBuilder/blob/81175dd6fe7e1ada7e69cabd44268932629c5fd7/src/plugins/bt-checkbox/plugin.scss#L3) * [ ] Checkboxes no longer inline * [ ] Field select boxes are not being populated when clicking the set data buttons
There are two possible types of errors here
These are quite different types of problem/seriousness.
I welcome anybody to do some last fixes/polishing on this MR. I've done the "heavy lifting" and if anybody has the motivation/energy/skills to find any issues that they feel are blocking and then fix those issues, that would be fantastic. (I would not take it as an insult to my "ownership" of this MR, quite the opposite. I welcome collaboration/help.)
@stephencmorton I started with your branch and have so far added a few changes to fix the checkbox rendering to correctly be inline and using BS5 classes: https://github.com/mistic100/jQuery-QueryBuilder/pull/988 It still looks a bit off, visually, where instead of rendering the SVG checkbox I just get a white square. I'll keep working at this PR and see if I can't address the remaining concerns. I was hoping to contribute my changes to your PR so yours is the one that gets merged and you get the credit for the work.
Hi @stephencmorton and @dethell - thanks for your work on this, it's much appreciated. Just to mention that I have someone in my team that I should be able to put onto this to help finish things off. Would you like to let me know if/when you need him to jump in?
Also, I was thinking about the backwards compatibility. Whilst I can see that different versions could be used with different versions of Bootstrap, I think it would be useful for the latest version (i.e. with this patch) to still work with Bootstrap 4. That version of Bootstrap is still widely deployed (including by my company) and it would be good to be able to use the latest version of QB to with it. I'm not sure what this would involve but I'd be happy to look at it.
Hi @stephencmorton and @dethell - thanks for your work on this, it's much appreciated. Just to mention that I have someone in my team that I should be able to put onto this to help finish things off. Would you like to let me know if/when you need him to jump in?
Also, I was thinking about the backwards compatibility. Whilst I can see that different versions could be used with different versions of Bootstrap, I think it would be useful for the latest version (i.e. with this patch) to still work with Bootstrap 4. That version of Bootstrap is still widely deployed (including by my company) and it would be good to be able to use the latest version of QB to with it. I'm not sure what this would involve but I'd be happy to look at it.
I'm happy for any help. I don't use Bootstrap 4 anymore, but I could see it being useful. I guess we'd need to evaluate how different it would be to support both.
Thank you both. Yes, I'd appreciate any help.
I was imagining that there would be a clean break and 2.7.0
(or 2.7.2
or .4
or whatever) would be the last Bootstrap4 release and then subsequent releases would be Bootstrap5 only. Alternately, I can imagine that @mistic100 could number the first Bootstrap5 release 3.0.0
and then if there were improvements/fixes that needed back-porting to bootstrap4, they could be done in a different feature development branch and releases from that branch could continue with the 2.x.y
numbering. Whether or not that actually happens, it does seem to me to make the most sense to have a new release be 3.x.y
for that reason and because for semantic versioning this is API-breaking in that it needs a new bootstrap release.
I spent a bit more time today trying to discern why the title in the button associated with each filter select input is not updating with the filter label. I can't see anything in your changes that would cause this so it must be a bug in the interaction between QueryBuilder and Bootstrap 5.
@stephencmorton can you check out the last push I made to my PR based on yours? I removed the use of the bt-selectpicker plugin which causing the select input problem. Now it just defaults to the standard Bootstrap 5 select markup and everything works well. I'm not sure there are any issues remaining except the checkbox icon.
I have resolved the checkbox icon in https://github.com/mistic100/jQuery-QueryBuilder/pull/990
Fantastic. Sorry, I meant to test this weekend as promised, but didn't find time. I'll get right on that.
I've figured out why Dark mode is messed up in this branch. If you see https://github.com/mistic100/jQuery-QueryBuilder/pull/973/files#diff-a11faa5810ac713931e63304028150455c6e34d4aef559c6ab0b6c7219153ffaR47 when you switch to dark mode it loads in another version of bootstrap from boot-swatch
. The version it switches to is Bootstrap 3.
Instead what i think we need to do is load in the same bootstrap 5 file, but set <html data-bs-theme="dark"/>
as well as the style overrides from dark.scss
.
I'm working on putting together another branch which fixes this and other things mentioned above.
Closing in favour of https://github.com/mistic100/jQuery-QueryBuilder/pull/992 - thanks for starting this @stephencmorton
I started to work to make jQuery-QueryBuilder work with Boootstrap 5. I believe I've done >80% of the "Bootstrap" work, I just need to verify that the popovers/tooltips work. (I do not think they do but I do suspect that the fix is very simple.)
So far it is pretty easy.
What is hard for me is the "npm" stuff. "packages.json" etc, making all the versions work together. I'm a professional programmer but I do not work in nodejs so all this
npm build stuff
is foreign to me. I imagine that what an experienced person in this area could finish in 20 minutes I could work on for hours and still fail. I'm hoping that somebody else can pick up that part and quickly do it.Merge request checklist
dev
and I am issuing the PR todev
dist
directory