Migration to Titanium and styling

Forum to discuss the new web client version of Servoy.

Migration to Titanium and styling

Postby patrick1645350822 » Fri Apr 15, 2022 10:29 am

@Sean and Servoy,
Thanks for the webinar about the migration sessions this week..

As expected and you also explained there were some issue's around styling (just followed your lead) and with SPM (I got a lot of warning and errors about duplicate, just removed them all, also from disk and reinstalled and that dit the job).

The strange thing now is everything looks to work fine if you launch and work with the application:
01.png


But when you do a browser refresh all styling is gone:
02.png


Any thoughts?

Kind regards,
Patrick Marelis
You do not have the required permissions to view the files attached to this post.
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Re: Migration to Titanium and styling

Postby jcompagner » Fri Apr 15, 2022 1:15 pm

that should not happen, can you show this in a sample and make a case?
when you do a browser refresh the less/css should just be pushed again, there shouldn't be any difference
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Migration to Titanium and styling - SOLVED!

Postby patrick1645350822 » Fri Apr 15, 2022 2:50 pm

Hi Johan,

I figured it out. It caused by a pice of the code (from the sample solution). There is an overwrite to custom styles where still the reference was made to the 'old' *.less file instead of the *_ng2.less file.
Code: Select all

function overrideStyleColors(mainColor, secondaryColor) {
   var newColorStyle = {
      'MAIN-COLOR': mainColor,
      'SECONDARY-COLOR': secondaryColor
   }

   // set the preferred colors
   var mediaOriginal = solutionModel.getMedia('SileramTemplateOriginal_ng2.less');
   var cssText = mediaOriginal.getAsString();

   // override css
   cssText = utils.stringReplaceTags(cssText, newColorStyle);
   var media = solutionModel.getMedia('SileramTemplate_ng2.less');
   media.setAsString(cssText);

   application.overrideStyle('SileramSolution_ng2.less', 'SileramTemplate_ng2.less');
}


Kind regards,

Patrick Marelis
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Re: Migration to Titanium and styling

Postby jcompagner » Fri Apr 15, 2022 3:07 pm

then the question is more why didn't that show up at first sight....
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Migration to Titanium and styling

Postby patrick1645350822 » Fri Apr 15, 2022 7:42 pm

That is indeed a good question.

I did some debugging and it does run nicely true the code the first run. But not when I do a page refresh in the browser. So to be honest I have no idea but is fixing the issue.
As I mentioned it is part of your standard example so maybe you can have a go with it yourselves?
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Re: Migration to Titanium and styling

Postby jcompagner » Sat Apr 16, 2022 11:02 am

it is logical that it only runs once.
because this is onsolutionopen and that just registers the override

application.overrideStyle('SileramSolution_ng2.less', 'SileramTemplate_ng2.less');

so every time we want to output 'SileramSolution_ng2.less' we output 'SileramTemplate_ng2.less'
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Migration to Titanium and styling

Postby patrick1645350822 » Sat Apr 16, 2022 1:18 pm

Hi,

Oké that makes that clear but not your question: more why didn't that show up at first sight....
But no longer a issue for me anymore.

I found two other items in the styling of ag-theme-servoy.
The right columns are not fully revealing
grid.png


The sidenav when collapsing is showing a scroll:
navleft.png


Is this something I should look into or do you pick this up and comes with a new style update?
You do not have the required permissions to view the files attached to this post.
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Re: Migration to Titanium and styling

Postby jcompagner » Tue Apr 19, 2022 10:37 am

for NGGrid that is not styling that is a layout issue that we don't see

for the Sidenav i dont know also looks more like layout instead of styling

So for both issues we need cases with a sample that demonstrates the issue
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Migration to Titanium and styling

Postby patrick1645350822 » Tue Apr 19, 2022 11:28 am

The think I know is when working on the none titanium version it works. What am I missing then.
cols.png


I will try to build a small solutions with these issue's some were this week..
You do not have the required permissions to view the files attached to this post.
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Re: Migration to Titanium and styling

Postby patrick1645350822 » Tue Apr 19, 2022 11:45 am

Just found one more.

In the titanium version the Grid does not scroll from left to right.
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Re: Migration to Titanium and styling

Postby Gabi Boros » Tue Apr 19, 2022 12:09 pm

there is an issue related to auto-size-columns-to-fit in the latest released NG Grids (both in ng and ti clients) - that will be fixed in the next release (this week) - it could be that you see the same issue
Gabi Boros
Servoy
Gabi Boros
 
Posts: 402
Joined: Tue Jun 26, 2007 4:03 pm
Location: Timisoara, Romania

Re: Migration to Titanium and styling

Postby patrick1645350822 » Tue Apr 19, 2022 4:17 pm

Hi all,

What do I know now:
One:
In my code I have a part to suppressColumnFilter. If you use this the columns does not show op anymore.
var toolPanelOptions = plugins.ngDataGrid.createToolPanelConfig();
toolPanelOptions.suppressColumnFilter = true;

Two
If you have 2 menu items in your sidenav with icons then when collapsing the menu the second (and third and and so on) get extra spacing in between them. Easy to reproduce. That causes with me the extra scroll due to the fact that the icons did no longe fit.

Three
Gridscoll / auto resize: I do only have this in titanium. But will check with the new version.
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Re: Migration to Titanium and styling

Postby patrick1645350822 » Thu Apr 21, 2022 2:33 pm

Hi,

Sorry to inform you but both issue's remain after the grid-update. Still no scroll from left to right in the grids and extra horizontal spacing in collapsed menu:

pre-titanium:
pre-tita.png


Titanium:
tita.png
You do not have the required permissions to view the files attached to this post.
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Re: Migration to Titanium and styling

Postby jcompagner » Thu Apr 21, 2022 2:42 pm

so make a case with a sample
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Migration to Titanium and styling

Postby patrick1645350822 » Thu Apr 21, 2022 3:24 pm

Here you can see that the height-spacing of the icons in the sidenav is changing when collapsing in tintanium.
The second one is non-titanium

sidnav_spacing.png


Grid example will cost me some more time.
You do not have the required permissions to view the files attached to this post.
Greetings,

Patrick Marelis
Sileram BV
https://sileram.nl
patrick1645350822
 
Posts: 37
Joined: Sun Feb 20, 2022 11:53 am

Next

Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 6 guests

cron