Comments (6)
Yeah I know, problem is that I don´t wan´t to include another 3rd party script just in case someone want to use the (optional) tooltip component in BS4 (the theme itself don´t us it). Even the BS4 sample demos don´t use it (and you will see the JS message...). And it seems the tether script must be loaded as extra script...it did not work if I compile it into the theme.min.js file along with BS4.
My problem is that the theme has to do another extra request and load another 23kb script...without any usage for 99.99% of all visitors.
But if I remove the tooltip component from BS4 the dropdown function did not work anymore...seems it use some snippets from this component.
Because BS4 is still in Alpha stadium I could live with it, hoping they found another solution/way for it.
If you found it let me know!
Child as dependency?
The child theme ist not a dependency from the parent theme, but the parent theme is already a dependency from the child theme;-)
The child uses a lot of stuff from the parent, but the parent don´t use anything from the child.
Or with other words: The child theme "depends" on the parent, but the parent did not "depend" on the child.
from understrap.
Ok. I'm not gonna use tooltips for this project either but my scripts don't work because of that. It works if I use bootstrap sprockets and do not load tooltips component.
I think it would be good to remove tooltips by default from the parent project and put info in the readme file on both projects.
It will prevent problems like mine. What you think?
Child as dependency?
No. Sorry for the confusion, I was really tired when I wrote that haha.
I meant to put Tether as a dependency in the parent project, but forget that, you already gave reasons not to =D
from understrap.
Here is what I changed in gulpfile.js to compile my scripts:
https://github.com/dvlopes/understrap-child/blob/jveventos/gulpfile.js#L91
from understrap.
Problem is if I don´t compile the BS tooltip.js file into it, the dropdown menu stops working and I receive this error:
TypeError: r.default is undefined
As far as I could see it you override (or simulate) the BS dropdown function by your own js, right?
Might be an option, but isnt the cleanest one, too for a theme framework.
There are ongoing discussions in the BS4 forums/git repo about managing theter as dependency. Will wait a bit till they found there direction...
from understrap.
Found a solution. Seems the problem was that I try to compile the tether.min.js into the theme.min.js file. If I add the Tether script as dependency and compile the non-minified tether.js before Bootstrap.js it seems to work. See changes here:
862fd60
Means I don´t need another request for theter and the error message is gone, but the theme.min.js file will be about 20kb bigger. Its not a perfect tradeoff but better than nothing...
from understrap.
As far as I could see it you override (or simulate) the BS dropdown function by your own js, right?
Might be an option, but isnt the cleanest one, too for a theme framework.
Yeah, I didn't consider using BS dropdown because it is for a sidebar menu, but I'll try it later on this project.
With the new release v0.4.3 the script is compiling and working well. Thx
from understrap.
Related Issues (20)
- Woocommerce Mini Cart Widget Stopped working with Understrap theme HOT 2
- Please provide a short summary of the problem (approx. 50 characters) HOT 6
- Theme contains outdated copies of Woocommerce template files HOT 5
- I can't figure out a way to make tagline appear in the header area. HOT 2
- RollupError: Unexpected character '@' HOT 4
- Potential typo in phpstan.neon.dist HOT 1
- Add IE Support for using bootstrap container classes in the block editor
- outdated woocommerce template files HOT 6
- The style.min.css file is not being linked to the page HOT 4
- npm run watch is not working HOT 13
- Feature Request: Add `.nvmrc` file with the needed version of node/npm HOT 3
- wordpress navbar toggle not working after log out HOT 4
- Accessing Bootstrap javascript constructors HOT 11
- Can we customize understrap_post_nav(); so it only gets prev/next from a specific category? HOT 18
- How to properly add additional js files HOT 1
- Release 1.2.4 Tracking Issue HOT 4
- Update to WPCS 3.0 (w/ PHP 8.2 support)
- Unable to build or run understrap projects - SyntaxError: Unexpected token '?' in file node_modules/lilconfig/src/index.js:161 HOT 1
- Optimize color palette generation for improved performance
- 5.3 Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from understrap.