B4J Tutorial SithasoDaisy TailwindCSS UI Toolkit: Q & A

Hi there

NB: Where possible, please include a simple project that demonstrates your use case.

Do you have any questions about SithasoDaisy UI Toolkit?

You can shoot it here and we will oblige.

Thanks in advance?


Join on Telegram


Check $5 WebApps

 
Last edited:

MichalK73

Well-Known Member
Licensed User
Longtime User
I have a problem and don't know what the fault is. I have Designer view1 for the site.
In the 2nd row there are 2 columns 1 and 2. In the 2nd jet button and it works.
In R2C1 it is blank.
1679313407555.png


I make myself a DIV in the code and plug it under R2C1 but it doesn't display in that position but completely underneath everything.
B4X:
    Dim c1 As SDUIDiv  =page.Root.Cell(2,1).AddDiv("c1")
    c1.wFull.p(5).bgColor("white").border("1px").borderColorIntensity("grey",200).rounded("lg").shadow("md")
    Dim tit As SDUILabel = c1.AddLabel("tit","Another big project")
    tit.Root.mb(2).textSize("2xl").fontBold.trackingNormal
    Dim opis As SDUILabel = c1.AddParagraph("op","Another success story in which the use of the B4J tool was crucial. The project is a little older, but I think it is interesting to many people.    I was in charge of preparing signature headers For imprinting data on pharmaceutical products. It Is a mechanical print, such As on various medicines, where the batch control number And the date of validity And occasionally also the date of manufacture are printed.    In production, many batches of different products were made daily, so these...")
    opis.Root.textColor("blue").fontNormal.trackingNormal
    
    Dim b As SDUILink = c1.AddAnchor("link", "Click ...","#")
    b.Root.bgColorIntensity("purple",600).rounded("lg").hover("bg purple 800").focus("outline none"

1679313591541.png

In Browser.

1679313881806.png


Why is this being done?
I set specifically where it should appear and it is underneath.
 

Attachments

  • 1679313687821.png
    1679313687821.png
    229.5 KB · Views: 152

MichalK73

Well-Known Member
Licensed User
Longtime User
Hmmm
As in R2C1 I put in the SDUIDIV in Desinger then I can insert data and the data is displayed.

1679316265209.png


In browser

1679316292402.png

So there must be a DIV already in the desinger located. It's a pity, I thought it was possible to dynamically add the element depending on how the page works.
As there is no DIV element on the designer it displays under the page as above.
 

asales

Expert
Licensed User
Longtime User
Due to my questions (posts 68, 78, 79, 80) that I can not get a soluction, I have one more:
can I use this SithasoDaisy in production or is to early?
 

Mashiane

Expert
Licensed User
Longtime User
One more to my question list:
- Everytime that I deploy a project, it create this files in the assets subfolder of www:
600by600.jpg, SithasoDaisyLogo.jpg, daisyui.jpg, .woff2 and .ttf extension files.

I don't use this files and it is don't in the assets folder of my project.
How can I remove this files automatically when I compile the project?

Thanks in advance.
These are files that come with the sithasodaisy.b4xlib, these are internal to the library.

You can just remove these in the b4xlib if you dont want them.
 

Mashiane

Expert
Licensed User
Longtime User
SithasoDaisy is already being used in production apps. All the original components from the daisyui website have been wrapped for SithasoDaisy.

We have been adding plugins to enhance the functionality of the library.

So yes, you can use it for production. I wish you all the best and if you have additional questions please dont hesitate to ask.

Thank you.
 

MichalK73

Well-Known Member
Licensed User
Longtime User
Hi, i need your help, can you please send me your layout that you were talking about so that i can investigate why its not working as expected?

Thank you so much.
I have added 2 subpages: working and notworking. I have added Desinger templates.
 

Attachments

  • Test.zip
    8.5 KB · Views: 137

Mashiane

Expert
Licensed User
Longtime User
The SDUIFullCalendar component is great, but:

1- I can translate the month, week, days and buttons use the locale property:
View attachment 139670
but I could not translate this button ("today"):
View attachment 139669

2 - If I resize the browser or access the calendar using a mobile, it don't show correctly:
mobile
View attachment 139671

desktop
View attachment 139672
It seems this lib was not built for full responsiveness.

on the original site, when resizing the calendar it does not do it well.

1679558472187.png
 

Mashiane

Expert
Licensed User
Longtime User
I have added 2 subpages: working and notworking. I have added Desinger templates.
NotWorking...

Mistakes...

1. You cannot name a component/element grid, grid is a 'class' name internal to TailwindCSS, this will create conflicts in the end.
2. The name of the page in the code is notworkin, this should be the same name on the layout for the page, Page Name* property, in you code this is "grid", change it to notworkin, same as the code module name.

1679596352220.png


1679596334497.png


3. You cannot use .Cell(X, Y) to refer to non-existing elements. Let me explain, The names of the elements you have specified are exactly this. The page class is named "grid", there is no element in your layout that starts with "grid" except the page. There is no gridr2c1 below, i.e. page.Cell(2, 1)

1679596081428.png


This below...

B4X:
Dim c1 As SDUIDiv  =page.Cell(2,1).AddDiv("div1")
  1. This means, find an element with id "[grid]r[2]c[1]"
  2. If the element does not exist, append it to the existing layout. This is added at the bottom of existing elements.
1679598218779.png


you need to fix you element names on the layout. I had changed the page name to notworkin in my example so that you see clearly what the issue is.

All the best.

Updated notworkin

1679599030903.png


Output.

1679598998176.png


You can also do this without changing your element names to start with the page name.

1. Generate members for your elements
2. Then

B4X:
Dim c1 As SDUIDiv = R2C2.root.AddDiv("div1")
 
Last edited:

MichalK73

Well-Known Member
Licensed User
Longtime User
1. You cannot name a component/element grid, grid is a 'class' name internal to TailwindCSS, this will create conflicts in the end.
I don't think it has an impact because it wouldn't work in the good working version either.
2. The name of the page in the code is notworkin, this should be the same name on the layout for the page, Page Name* property, in you code this is "grid", change it to notworkin, same as the code module name.
I have checked as you say, in the version as the names match and as the names do not match. In each case it is the same.
Dim c1 As SDUIDiv = R2C2.root.AddDiv("div1")
This has helped and works perfectly, even if the Page Name in Design is different to the 'name' in the module.
 

sdleidel

Active Member
Licensed User
Longtime User
I have a question about SDUITable.
How can I determine the total items ?
So the items (number) that you have previously written with Setitem in the table.
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hello Mashiane,
In my effort to use Sithaso as my preferred web development tool, i found out that I could not find a way to generate printouts. Is there a way that I don't know, to create printable reports? If not, do you think that is something you could do to integrate something like that in the future? perhaps Jasper reports integration ?
 

Mashiane

Expert
Licensed User
Longtime User
Hello Mashiane,
In my effort to use Sithaso as my preferred web development tool, i found out that I could not find a way to generate printouts. Is there a way that I don't know, to create printable reports? If not, do you think that is something you could do to integrate something like that in the future? perhaps Jasper reports integration ?
One can do these in Ms Word currently. Please see these posts...



 

MichalK73

Well-Known Member
Licensed User
Longtime User
I have a small problem.

I have a page where there is a background (graphic) and a modal window with data to enter.
When I press the button it checks if the data needed is entered, if not it displays a message. When the message is displayed, the background of the page disappears.


screen1.jpgscreen2.png
 

Mashiane

Expert
Licensed User
Longtime User
I have a small problem.

I have a page where there is a background (graphic) and a modal window with data to enter.
When I press the button it checks if the data needed is entered, if not it displays a message. When the message is displayed, the background of the page disappears.


View attachment 140916View attachment 140917
I must say that is some amazing UI right there. Its possible that the sweetlalert is interfering with the background image. I will have to investigate the matter as soon as possible.

Later.
 
Top