Comments (9)
The issues with driver's solution is that it will force z-index on the elements, which will very quickly break any slightly more complex layouts that rely on z-index (that can also include positioning, opacity, etc. of elements).
Yes, that's why I turn to use boarding.
But stage is useful for hiding popup、modal and notifications without making any changes to the highlighted element itself. Hope to see it soon. @josias-r
from boarding.js.
@Usey95 Could you share a screenshot to illustrate the problem?
The popover
element can be styled any way you want. So I assume you are talking about the color of the cutout
element (darkening of the screen)?
from boarding.js.
@Usey95 Could you share a screenshot to illustrate the problem?
The
popover
element can be styled any way you want. So I assume you are talking about the color of thecutout
element (darkening of the screen)?
Yes!If the whole UI is in dark color, it's hard to distinguish the cutout element.
from boarding.js.
@Usey95 I see.
I think you can already force overwrite the styling with css. The element you are looking for is the .boarding-coutout-svg path
element. You can try to overwrite the fill
styling using a stylesheet like this:
.boarding-coutout-svg path {
fill: white !important;
}
Note that you can also already configure the opacity of the darkening, which might also help with your problem, without needing to change the color:
const boarding = new Boarding({
opacity: 0.8, // try numbers ranging from 0 to 1
});
If the first option is desired, I will consider adding it to the available options so it can be configured without the need for a !important
stylesheet. Then it would look something like this:
const boarding = new Boarding({
cutoutColor: "white", // or `rgb(255,255,255)` or #FFFFFF, ...
});
from boarding.js.
@josias-r Appreciate for your detailed reply!
Maybe I didn't make myself clear. What I want is to highlight the focused item directly instead of dealing with the background.
There are two way to do this, either add a border or add a background with inverted color.
For background way, the lib don't have a standalone element for now and zindex should be added to the focused item.
For border way, now the path leaves a border for the whole page. You can see what I say when you stoke it.
Maybe an option like this would help:
const boarding = new Boarding({
highlightedBorderColor: "white", // or `rgb(255,255,255)` or #FFFFFF, ...
...other attr for stoke
});
from boarding.js.
@Usey95 If you want to add styling to the highlighted element itself, you can also do this, simply by adding styles to the boarding-highlighted-element
class. This class will always get applied to the currently highlighted DOM element.
If this is still not what you are trying to achieve, please provide a screenshot illustrating the problem 😄
from boarding.js.
I think a stage like driver would help, but I solved my situation anyway.
from boarding.js.
@Usey95 There is already a ticket for that #5.
But I still have to experiment with the concept of a stage, because there are a lot of issues the way driver approaches the idea, and I'm not sure of the advantages of a stage, which cannot be done with the methods I meantioned above.
The issues with driver's solution is that it will force z-index on the elements, which will very quickly break any slightly more complex layouts that rely on z-index (that can also include positioning, opacity, etc. of elements).
Boarding aims to be a general solution that works for simple websites but also compelx web applications with modals, dialogs, dropdowns, etc.
I will close this, and keep the other ticket open.
from boarding.js.
@Usey95 Interesting feedback, thank you :D
Can you give concrete and full examples for hiding popup, modal and notifications
? I will note them down in the main ticket. I'm holding out on working on that stage feature, since I am not sure on what results are desired. So any concrete examples of what you would like to have as a built-in functionallity will be a next step for the concept
from boarding.js.
Related Issues (15)
- Testing🤖: Initialize jest + write unit tests
- Idea💡: Create a concept of a Stage (similar to driver.js)
- Feature✨: Support promise step-handling out of the box
- Documentation✏️: Document new features + differences + migration guide
- Documentation✏️: Show React hook integration example HOT 2
- Help Wanted🙏🏻: External monitor causes an offset of the highlighted element and the cutout HOT 2
- The automated release is failing 🚨
- Cannot use CDN HOT 2
- Feature✨: hints HOT 3
- Enhancement: Support for IDs starting with numbers or consisting of only numbers HOT 1
- Unable to preventDefault inside passive event listener due to target being treated as passive. See HOT 4
- Edit the svg to change the values of the highlighted element HOT 1
- Pointer issue on smaller screen HOT 1
- How do you style the buttons? HOT 1
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 boarding.js.