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:

Mashiane

Expert
Licensed User
Longtime User
how to use Search into SDUITable ?

here search from SDUITable:
View attachment 152039
search with phpadmin (mysql) is correct
View attachment 152040
SithasoDaisy uses a fuzzy search (https://www.fusejs.io/). You will have to DM me a dump of your records so that I can reproduce this and see what could be happening.
This searches on all the columns in the table per record and detects matches from there and not just one column.

You can Log(BANano.ToJSON(.results)) and then DM me the result.
 
Last edited:

giannimaione

Well-Known Member
Licensed User
Longtime User

SithasoDaisy,​

slow compilation
maybe there are too many libraries?
lib.PNG

and into pgIndex:
B4X:
Sub AddUses
    BANano.Await(app.UsesPDF)
    'BANano.Await(app.UsesExcel)
    BANano.Await(app.UsesCSV)
    'BANano.Await(app.UsesDropZone)
    BANano.Await(app.UsesFlatPickDateTime)
    BANano.Await(app.UsesRollDate)
    BANano.Await(app.UsesPocketBase)
    BANano.Await(app.UsesFlipPage)
    BANano.Await(app.UsesTimeLine)
    BANano.Await(app.UsesGridNav)
    BANano.Await(app.UsesChartKick)
    'BANano.Await(app.UsesQRCode)
    'BANano.Await(app.UsesBarCodeReader)
    'BANano.Await(app.UsesWebCam)
    BANano.Await(app.UsesAxios)
    BANano.Await(app.UsesLottiePlayer)
    BANano.Await(app.UsesDocxTemplator)
    BANano.Await(app.UsesHTMLParser)
    BANano.Await(app.UsesLZCompressString)
    BANano.Await(app.UsesFullCalendar)
    BANano.Await(app.UsesDevice)
    'BANano.Await(app.UsesKanBan)
    BANano.Await(app.UsesAES)
    'BANano.Await(app.UsesGMaps)
    'BANano.Await(app.UsesAES4PHP)
    BANano.Await(app.UsesToastChart)
    'BANano.Await(app.UsesMockupCode)
    'BANano.Await(app.UsesFireBase)
    'BANano.Await(app.UsesSupaBase)
    BANano.Await(app.UsesRelax)
    BANano.Await(app.UsesGijgo)
    BANano.Await(app.UsesJustGage)
    BANano.Await(app.UsesFluidMeter)
    BANano.Await(app.UsesFrappeGantt)
    BANano.Await(app.UsesEvoCalendar)
    BANano.Await(app.UsesCollectJS)
    BANano.Await(app.UsesSwiper)
    'BANano.Await(app.UsesStories)
    BANano.Await(app.UsesEnjoyHint)
End Sub
wait 40 50 seconds
Processing b4xlib: sithasodaisyrelax
Processing b4xlib: sithasodaisyrolldate
Processing b4xlib: sithasodaisysqlitee
Processing b4xlib: sithasodaisysupabase
Processing b4xlib: sithasodaisytoastchart
Processing b4xlib: sithasodaisy
Processing b4xlib: sithasodaisyalasqle
Processing b4xlib: sithasodaisyaxios
Processing b4xlib: sithasodaisycollectjs
Processing b4xlib: sithasodaisycsv
Adding Layout articolilayout used by articoli
Adding Layout pagamelayout used by pagame
Adding Layout homelayout used by pghome
Adding Layout baselayout used by pgindex
Adding Layout adsigninlayout used by pgsignin
Adding Layout adsignuplayout used by pgsignup
Adding Layout prova used by prova
Adding Layout varmov used by varmov
Adding Layout varordini used by varordini
Adding Layout adblanklayout used by blanklayout
Adding Layout categorielayout used by categorie
Adding Layout clientslayout used by clients
Adding Layout disponibile used by disponibile
Adding Layout insmov used by insmov
Adding Layout movord used by movord
Adding Layout ordini used by ordini


'**** there is a wait of 40 50 seconds ****

OPTIMISATION: 4504 method(s) appear to be unused. You should set RemoveDeadCode=True to speed up the WebApp considerably!
OPTIMISATION: 77 class(es) appear to be unused. You should set RemoveDeadCode=True to speed up the WebApp considerably!
Copying CSS files to WebApp assets...
Copying Javascript files to WebApp assets...
Building C:\pocketbase\pb_public\pastafactory\index.html
OPTMIZATION TIPS
----------------------
You are using A LOT of seperate CSS and JS files! This demands a lot of server roundtrips which can slow down your website/webapp considerably
This results in fewer page views, a decreased customer satisfaction and ultimately a loss in sales conversions
----------------------------------------------------------------------------------------
BANano detected over 1360.6KB of UNUSED TRANSPILED CODE in the WebApp!
Activate the RemoveDeadCode in TranspilerOptions to speed up the WebApp considerably.
----------------------------------------------------
BANano v8.19: conversion finished!
----------------------------------------------------
 

Mashiane

Expert
Licensed User
Longtime User

SithasoDaisy,​

slow compilation
maybe there are too many libraries?
View attachment 152162
and into pgIndex:
B4X:
Sub AddUses
    BANano.Await(app.UsesPDF)
    'BANano.Await(app.UsesExcel)
    BANano.Await(app.UsesCSV)
    'BANano.Await(app.UsesDropZone)
    BANano.Await(app.UsesFlatPickDateTime)
    BANano.Await(app.UsesRollDate)
    BANano.Await(app.UsesPocketBase)
    BANano.Await(app.UsesFlipPage)
    BANano.Await(app.UsesTimeLine)
    BANano.Await(app.UsesGridNav)
    BANano.Await(app.UsesChartKick)
    'BANano.Await(app.UsesQRCode)
    'BANano.Await(app.UsesBarCodeReader)
    'BANano.Await(app.UsesWebCam)
    BANano.Await(app.UsesAxios)
    BANano.Await(app.UsesLottiePlayer)
    BANano.Await(app.UsesDocxTemplator)
    BANano.Await(app.UsesHTMLParser)
    BANano.Await(app.UsesLZCompressString)
    BANano.Await(app.UsesFullCalendar)
    BANano.Await(app.UsesDevice)
    'BANano.Await(app.UsesKanBan)
    BANano.Await(app.UsesAES)
    'BANano.Await(app.UsesGMaps)
    'BANano.Await(app.UsesAES4PHP)
    BANano.Await(app.UsesToastChart)
    'BANano.Await(app.UsesMockupCode)
    'BANano.Await(app.UsesFireBase)
    'BANano.Await(app.UsesSupaBase)
    BANano.Await(app.UsesRelax)
    BANano.Await(app.UsesGijgo)
    BANano.Await(app.UsesJustGage)
    BANano.Await(app.UsesFluidMeter)
    BANano.Await(app.UsesFrappeGantt)
    BANano.Await(app.UsesEvoCalendar)
    BANano.Await(app.UsesCollectJS)
    BANano.Await(app.UsesSwiper)
    'BANano.Await(app.UsesStories)
    BANano.Await(app.UsesEnjoyHint)
End Sub
wait 40 50 seconds
It seems you are running the demo and yes it's a huge app and thus will take time to compile.

Also on the demo, the removal of dead code has not been activated. I have not tried using this as yet.

Please note that which each new version of Banano, the compilation time increases due to new features. For example the compilation time between 7 and 8 is 'feelable', so I have grown more patience. This is due to what Banano does internally about your project. The bigger the project is the more time it will take.

The demo app is about everything on the b4xlib showcase too. With other projects that don't use all features of the b4xlib the compilation process might be a little quick.
 
Last edited:

giannimaione

Well-Known Member
Licensed User
Longtime User
It seems you are running the demo
no, it is a new project
yes, i have copy e paste from your demo!

in my project features important are: pocketbase, sduitable, sduitext (with date-picker), sduistats, label, buttons;
maybe I will have to generate pdf or csv later

which libraries can I exclude?
and which BANano.Await(app. .......) can i exclude?
 

Mashiane

Expert
Licensed User
Longtime User
I see, the easiest way to create a new project with SithasoDaisy is just use the provided templates and then add the b4xlibs you need as and when.

1711457557123.png


In most of my examples I just use the MultiUser template and then tweak other things from there.

Depending on which date picker you need, you can select FlatPick / RollDate.

The splitting of the b4xlibs was done so that one can choose which libs to use and not and not bundle your apps with libs you wont use as explained in this post.


Please also note PocketBase is now internal to SD, so dont include it, as much as you will still need to call UsesPocketBase. You can exclude most of the b4xlibs and most of the uses calls. Rather start small and then add as you go along.
 

giannimaione

Well-Known Member
Licensed User
Longtime User
how access to db SQLite (pocketbase)

this is fantastic:
B4X:
Private myPocketBase As SDUIPocketBase
'
'
'
    banano.Await(myPocketBase.SELECT_WHERE1)
    Dim lstResult As List = myPocketBase.result
'
'
'

but, can access to db sqlite in addition to SDUIPocketBase?

example:
B4X:
dim accessDB as ......
accessDB.Select (query) 
'
'
 

Mashiane

Expert
Licensed User
Longtime User
how access to db SQLite (pocketbase)

this is fantastic:
B4X:
Private myPocketBase As SDUIPocketBase
'
'
'
    banano.Await(myPocketBase.SELECT_WHERE1)
    Dim lstResult As List = myPocketBase.result
'
'
'

but, can access to db sqlite in addition to SDUIPocketBase?

example:
B4X:
dim accessDB as ......
accessDB.Select (query)
'
'
There are a variety of projects that I have posted in the forum that use PocketBase. Above that, the demo application has an example of crud functionality included in it.

From searching in the forum, you can find...











This is B4J Compatible (Outside BANano)
 

giannimaione

Well-Known Member
Licensed User
Longtime User
hi family,

how to add SDUITable into SDUIModal (via code or AD visual designer) ?
 

Mashiane

Expert
Licensed User
Longtime User
hi family,

how to add SDUITable into SDUIModal (via code or AD visual designer) ?
Have you taken a look at the SithasoDaisy PDF eBook?

Page 124 of the PDF download that comes with SithasoDaisy, shows you how to add components to the dialog via code and as you continue you will see how to do same via the abstract designer. This includes adding a grid and then adding components to the grid etc.

Page 162 one adds a table to a grid in a page. You can use the same methodology to add a table on a modal using code.

Here is a quick shortcut to it, TailwindCSS WebApps using B4X.pdf
 

giannimaione

Well-Known Member
Licensed User
Longtime User
looking for suggestions

what approach or suggestion for a sithasodaisy web application to make usable too for smartphone devices?
This application uses sduitables and data entry crud
What are the parameters to check (font, size, margins, paddings, ....)?
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hello Mashiane,
You recently introduced a new SDUIFormComponent.
I have not clear how this can be used in a form linked to a table_editrow event.
can you give me an hint ?
 

Mashiane

Expert
Licensed User
Longtime User
looking for suggestions

what approach or suggestion for a sithasodaisy web application to make usable too for smartphone devices?
This application uses sduitables and data entry crud
What are the parameters to check (font, size, margins, paddings, ....)?
Let me think... will revert soon.
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hi Mashiane,
I have a problem on table textarea fields and word wrap. The words get broken when they go to the next row.
I tried to use table.SetColumnClass("fieldname", "break-words"), but it looks to have no effect,
Can you help ?
 

Mashiane

Expert
Licensed User
Longtime User
Hi Mashiane,
I have a problem on table textarea fields and word wrap. The words get broken when they go to the next row.
I tried to use table.SetColumnClass("fieldname", "break-words"), but it looks to have no effect,
Can you help ?
Can you post a screen shot of what you mean so that I can understand please?
Also if possible just indicate the expected behavior.
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
The word in green "TESSUTO" is a single word.
As other words That do not fit in the row, it gets cut in the middle.
If it doesn't fit it should go on next row,
for example:

"POLTRONA GIREVOLE IN
TESSUTO CON RUOTE E
BRACCIOLI"
or use hyphenation
"POLTRONA GIREVOLE IN TESSU-
TO CON RUOTE E BRACCIOLI."


Screenshot 2024-07-02 alle 21.53.17.png
 

Mashiane

Expert
Licensed User
Longtime User
Thanks for the clarity.

The class "break-words" actually break the words, I think you need to use "text-wrap"

Because SetColumnClass applies to the TD element, (parent) of the text-area, try and use the ComputedClass method.

I have not tested this.

tbl.SetColumnComputeClass("fieldname", "ComputeTheClass")

B4X:
Sub ComputeTheClass(item As Map) As String
return "text-wrap"
End Sub

Each row will be included the text-wrap class in the text-area.

I hope it works.

Some reading..

 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Thank you Mashiane,
unfortunately it didn't work either,, text displayed is exactly the same as the one in picture i posted earlier :-(
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Solved:

your tbl.SetColumnComputeClass("fieldname", "ComputeTheClass") worked!
only difference is that the class to be returned has to be "break-normal"

B4X:
Sub ComputeTheClass(item As Map) As String
return "break-normal"
End Sub

thank you for your help..
 
Top