#UDTextLoop Powershell Universal Component Module 🥳


#Demo Dashboard 😎
I did tweet this exact dashboard, honestly there is so much tuning you can do with the looping effect but I thought this looked good for a demo purpose
#Revisiting a component 🧐
It was only after building this module, like almost immediately after. I thought damn I am sure I have done a text loop before. However I am pretty sure this is using a slightly different package than the previous text looper. I have delayed writing this blog, as this component did not seem to be responding to a particular parameter. Ends up I was to blame. Although I try to be careful when I type, I had made a tiny-typo on the hashtable in the function, so the name was not matching the prop name being defined in the main component JSX file. Hence the parameter was not working fully. Once this was corrected it was time for me to cook up a demo dashboard displaying how to use this component should you so wish.
#Remember it is your imagination 🤯
Recently on the forum someone wanted a component to be displaying slightly wider. I was like I am sure you can get the result you want using New-UDStyle. I posted an example of how I am using this for the reading progress bar. Boom a few days later they replied to say they had solved it with New-UDStyle. I know to use this software Powershell Universal you do not need or require any HTML,JS or CSS knowledge, as the majority of the customization can be done via parameters built in. Or possibly choosing one of the hundreds and hundres of new themes the lovely Chrissy Lemaire spent time working on.
#Cascading Style Sheets 🤓
Only sometimes you need to dig-deep and try a little sprinkle of CSS. So without going off on a marjor side-track all about Cascading Style Sheets basically in a nut-shell this is what is used to apply certain styling to certain elements of the webpage. This gives greater flexibility and control how styling is done on only the elements of the webpage you want styled. For a complete break-down on what CSS is then just search the web to find out more information on it, but this is a brief introduction to what CSS is and why it is used. It is like a simple hash table, you have a key, then you have a value associated to that key.
#Making It Possible 😯
It really does seem anything is possible with Powershell Universal but yeah you might have to learn some new-tricks to make your exact vision of the perfect idea become a reality. For me CSS was almost like the missing ingredient I had to learn to make the perfect receipe for a nice visually looking display exactly how I wanted.
In hind-sight I suppose I could have wrapped this textloop with custom CSS styling built into the <div>
it is nested in. Again having not used this software for a while these thing will come back to me or I can add a new version to the gallery if this is popular enough or requested by someone.
However as I mentioned early on in this blog New-UDStyle
can add that bit of styling you want for your particular component. So this is why I have wrapped the demo in New-UDStyle
as I wanted this to be bold and big on the page. I wanted all the text to have a big impact, so this is why I relied on CSS for the finishing touches.
#The Project 🏗️
Again you may look on npmjs and be like wahoo this only has two dependencies, however that may not be quite true, as those two dependencies, might have sub-dependencies and so on. This had a total of ten different dependency packages that needed to be installed
#Normal Procedure 🗃️
After discovering that this needed a fair few dendencies I decided to do the normal procedure I follow of renaming files and certain bits of the files (please see previous blogs if un-sure on this process
I then copied this list into notepad then ran this one line to install all these dependencies
This is the final version of the component JSX file:-
So VSCode was not complaining about any of the code above, so now I needed to edit the .PSM1 and .PSD1 file to finish this component off before running invoke-build so this is my final PSD1 file below
To make the actual cmdlet behind this component you need to edit the pre-defined function in the .PSM1 file so this is my finished .PSM1 before running the invoke-build