What is best way to add buttons or links to the ExpansionPanel without triggering a collapse? - material-ui

I am using material-ui's ExpansionPanel and inside the ExpansionPanelSummary I would like to add some action items (Links or Buttons) so that users can interact with nicely to drive something inside that panel. When I added a Typography and Link under, what seems to happen is that clicking on the link will also collapse the panel (and vice-versa if it is already collapsed).
Is there a way to have the summary not collapse/expand when items inside the panel's summary are clicked?

Related

How to change visibility of views in the sidebar via the VSCode-Extensions API

You can change the visibility by clicking the caret seen in the screenshot above. Is there a way to trigger this visibility change via the API? I can't find any setter for the visibility inside the VSCode Extension API-documentation
In this case this is a TreeView and this means the needed method would trigger the views onDidChangeVisibility-Event.
If you want to collapse the view (and not just its contents), I think the answer is that it cannot be done programmatically from an extension at this point.
See API to programatically expand/collapse tree view: which is "On Deck" (and I think could be easily implemented - so upvote it).
If you were happy to just collapse the contents of the view but not the entire view, see I want to Collapse a VSCode tree view programatically.
Finally, it is relatively easy to remove the view altogether, see how to use vscode extension to hide timeline and outline in the side bar and
await vscode.commands.executeCommand('timeline.removeView');
but I can't find a good way to programmatically add a view back except
await vscode.commands.executeCommand('workbench.action.quickOpen', 'view NPM Scripts');
await vscode.commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem');
which is less than optimal. If, however, it is your treeView you could use the TreeView.reveal() command which will open the view if it is closed. You do have to pass some element to the reveal(), perhaps the root of the tree.

Any links or HTML form items like button inside the Bootstrap 4 modal is unusable

I have cart icon, which when clicked loads the cart of the user in a Modal. However, any link or HTML form items like input or buttons that are within this modal are unusable. It can never be brought to focus nor clicked. I tried playing with CSS property z-index with no success.
Check site here.
Add any product to cart and then click bag/cart icon on the top right to see the issue.
Changing the pointer-events value in CSS solved the issue. wrapping the content part in an element with class modal-content is also fixing the issue as suggested in comments.

ObjectPageLayout inside a Dialog

Can I insert Object Page Layout (for example this https://openui5.hana.ondemand.com/explored.html#/sample/sap.uxap.sample.ObjectPageSection/preview) inside a Dialog?
If I try to do it, I see only the anchor bar, not the bottom body.
The solution is to disable scrolling on the sap.m.Dialog element to avoid the Dialog from adding content indefinitely. See https://github.com/SAP/openui5/issues/2514

Wordpress - Show Portfolio Categories

I'm working with a WordPress website and a client wants to show a list of categories in the footer. Unfortunately, it is showing as empty because he has no posts and has set the categories to portfolio items which he wants people to be able to click to.
So, how do I show the portfolio categories in the widget rather than the post categories?
Thanks,
Jack
Probably the easiest way I can think of to get the result that you want without having to resort to changing any Theme Files would be this:
Log into your Wordpress Dashboard
Navigate to Appearance->Menus
Create a new Menu, and (if applicable) enable the Custom Taxonomies for your menu by clicking on Screen Options (top right-hand corner of the page) and ticking your Portfolio's Custom Categories and/or Custom Post Types
Once all of the items you want is in your Custom Menu, save it.
Navigate to Appearance->Widgets
Add the Custom Menu Widget to the sidebar in which you would like your items to appear
Select the Custom Menu you just created, and Save
When dealing with Premium Themes, it would always be safest to stay out of their code and avoid changing anything altogether, so try this approach first. Otherwise, you may have to get your hands dirty and alter some code or contact the Theme Developer.

SmartGWT: hide current element showing in Canvas

I'm working something like a dynamic menu, where you click some radio buttons and it shows a specific form, each radio control matches to a different form.
Examples from the showcase always base themselves on the Tabs widget and I don't need that behaviour.
I opted for placing all the forms inside one Canvas and hide/show them accordingly (Not sure this was the best idea, if someone knows better I would like to hear it)
Now my problem is that every onClick event has to .show() one form and .hide() the other 9. that is annoying.
Is there a way to "get" the current displayed child in the Canvas and hide it?
If what you want is basically mutex display, you could put all the components as members of a Layout instead of a Canvas, then use setVisibleMember(). That hides all other members.