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

Website examples common.scss mismatch #91

Open
kyesil opened this issue Dec 17, 2024 · 3 comments
Open

Website examples common.scss mismatch #91

kyesil opened this issue Dec 17, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@kyesil
Copy link

kyesil commented Dec 17, 2024

Description

We like the Foblex Flow plugin and want it to improve:
In the examples specified on the website, the file name common.scss
but the usage in the code is specified as flow-common. also it is not clear where the ../../flow-common.scss file should be.
Also it is confusing that connection-types should be the same as component selector. For all examples ::ng-deep f-flow { is enough.
Here is the working example :
https://stackblitz.com/edit/stackblitz-starters-euaf2ouu?file=src%2Fpages%2Fflowpage%2Fflowpage.scss,src%2Fpages%2Fflowpage%2Fflowpage.component.ts

In previous issues I mentioned that it should be simpler to have common.scss built in @foblex/flow.
These complications can make a beginner give up. We didn't give up, we thought about how @foblex/flow could be better.
Also, Foblex Flow zoneless work is good
Thank you for your efforts.

Steps to Reproduce

In website select an example
https://flow.foblex.com/examples/connection-types

Expected Result

https://stackblitz.com/edit/stackblitz-starters-euaf2ouu?file=src%2Fpages%2Fflowpage%2Fflowpage.scss,src%2Fpages%2Fflowpage%2Fflowpage.component.ts

Actual Result

image

Environment Details

Node 22
Angular 19

Screenshots or Videos

No response

Additional Context

No response

@kyesil kyesil added the bug Something isn't working label Dec 17, 2024
@siarheihuzarevich siarheihuzarevich added question Further information is requested and removed bug Something isn't working labels Dec 17, 2024
@siarheihuzarevich
Copy link
Member

siarheihuzarevich commented Dec 17, 2024

Hello,

Thank you for your feedback and detailed observations. Let’s address the key points:

1. File name common.scss vs flow-common.scss:
In the examples on the website, the logical name common is used, but the actual file is flow-common.scss. This is done for display clarity. You have access to the full repository code, where you can see exactly how everything is set up. The name “common” is simply the tab label for demonstration purposes.

2. Using ::ng-deep and selectors:
• If you use ::ng-deep connection-types {}, it works because ::ng-deep allows styles to “pierce” Angular’s ViewEncapsulation and apply globally.
• However, you can also write styles globally without using ::ng-deep or selectors. It entirely depends on your preferences and understanding of how Angular styles work.

3. Complexity for beginners:
Foblex Flow provides powerful and flexible tools for creating diagrams but assumes that users have a basic understanding of Angular and CSS. If styling presents challenges, it might be helpful to explore Angular fundamentals, such as ViewEncapsulation and managing global styles, a bit further.

Thank you again for your suggestions and observations. I’m always happy to see engaged users striving to improve their workflow. The documentation already contains all the necessary examples and explanations, but if you need further clarification, you can always refer to it or explore the repository code.

@kyesil
Copy link
Author

kyesil commented Dec 17, 2024

• However, you can also write styles globally without using ::ng-deep or selectors. It entirely depends on your preferences and understanding of how Angular styles work.

Beginner developers may not know @use and ::ng-deep keywords. Personally, at first look I thought @use was correct and it didn't give any error. I thought it should be enough to use <f-connection fType=“bezier”/> if I want to change the type of a connection. The need for extra css is unusual.
Most developers simply try it and when it doesn't work, they switch to another library or write in react.
Also, single file components for examples on the website may be more understandable.
Thanks for your effort.

@siarheihuzarevich
Copy link
Member

Thanks for the recommendation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants