Being new to web dev, this may be a dumb question…
In Vision, I’m able to hack around and
break change things in a given component to better suit my needs. For example, allow the dropdown component to support disabling items and increasing the touch area heights of the items.
Can we do this in perspective components? And if so, how? Do you have any examples?
On the plus side, adding an external component to Perspective is, generally, easier than Vision - personally, I’d like to add some kind of easy builder that handles the (minimal) Java portions required and makes it easier for front-end-ey folks to just supply their own JS code much more easily.
Well, the other end of things is that generally, what people are after with deeply complex Vision scripts is the ability to customize appearance - which is instantly easier in a web context thanks to CSS. With better support for custom themes on the way, it’s only going to get better - even over and above style classes, you’ll be able to provide a custom theme that automatically styles your entire project - and CSS can do customization far beyond just coloring elements.
For the other things, such as customizing behavior, yes, there are limitations - you aren’t able to totally customize things as you can in Vision - but, also keep in mind that Perspective/8.0 hasn’t even been out for a year, compared to Vision’s ~decade lifespan. If things go according to plan, we’ll soon have first-party components or combinations of settings that cover 99% of the functionality you would want to customize - and then for those rare exceptions, custom modules are still available to you.
And, for what it’s worth, if you know Python, JS isn’t a far leap - or, if you want a really nice experience, you can develop with TypeScript (which we use in Perspective) - it’s the dynamic nature of Python, but with many of the advantages of a strong type system like Java has.
Out of interest, would something like moving the scrollbar of a table/flex repeater component to a specific location be possible in Perspective? Or is this something that would need a component change?
(Ignition - Table Component: Scroll Bar Hide & Selected Row)
We would probably have to expose an internal like
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView via a scripting method - first on components directly, then for something like the table it would have to have an ability to pass a specific row ID or something similar. That’s a decent feature request, though - I’ll file an internal ticket
Cheers! As you probably read, I use it in Vision to keep the active sequence step in a list of steps always visible. It’s super handy for an operator I can see it being useful for other things as well though
I’m looking to do exactly the same as Nick, to keep the active row in a perspective table in view. Has the ‘scrollIntoView’ been implemented?
I just pulled this ticket back in to be evaluated and re-prioritized. Not sure when this would be planned or implemented at this point though.
Checking back in here… any update on this scrollbar idea?
It’s a low priority ‘feature’ in our backlog, and we tend to prioritize features below bug fixes, since more features inevitably means more bugs.
Hey guys, any update on this? It has been a while and it is an important feature for us.
Bump for jumping to selection in table
@victordcq one more for you, Victor, if you get a chance at some stage I'll give it a crack in the meantime if I get a chance!
quite easy if you have virtualized rows off. if not will be a bit harder. well asuming the table gets loaded in fast enough.
i can make something better, but dont have time right now
Now that the pandora-markdown box is open, how about making js injection a bit... cleaner ?
eh, there is no way to do this clean, safe and easily for someone who doesnt know js.
But at the moment, when they do need js, they come to the forum and end up hacking the markdown component. That can't be a good solution.
And for those who know js, they still have to go through hoops.
That there is no built-in way is not stopping anyone, it just makes it ugly.
i mean you could call it a js component, but it would look just the same tbh.
it would both be text to html, and would require onload hacks, unless perspective does some things around it for only js onload, but that would limit the flexibility.