shiny dashboardPage together with navbarpage layout - shiny

I like the new library(shinydashboards), but I wonder whether it's possible to arrange several tabs next to each other in the dashboard header - like in the navbarpage layout of the normal shiny library?
It seems impossible to use the navbarlaout within a "dashboardPage" since "navbarPage" is a layout command like "dashboardPage".
Nevertheless, a combination of navbarpage & dashboardPage would be interesting.
From the shinydashboard examples I found (below and others), it looks like different dashboard tabs can only be placed in the sidebar.
Has anyone found a way to add tabs for several dashboards in the "dashboardPage" header?
https://github.com/rstudio/shinydashboard/tree/gh-pages/_apps

Samples here are using the dropdownMenu() function. The type is currently very limited (e.g., can choose icon from libraries font-awesome or glyphicon, but not text), but maybe that is enough customization to make this useful for your application?

So I've been adding tabs to my top header by adding them as links within html tags. I appreciate this isn't quite the same thing as having tabs, because the links are hosted on different urls, but in my case that's the whole reason I need the additional tabs and can't just use navbarPage e.g.:
dashboardPage(
dashboardHeader(
title = "Your Page Title",
tags$li(
a(
strong("Tab Title"),
height = 30,
href = "www.google.com"
title = "",
target = "_blank"
),
class = "dropdown"
)))}

Related

How can I view all the content of redmine, such as projects and tickets, easily on the screen?

I'm using REDMINE.
I have a list of projects on the screen.
Is it possible to add details of the ticket content to this screen?
I'd like to look over the screen at once instead of clicking with the mouse, how do I do that?
Also, if you have any plugins or useful tips and so on, please let me know.
Tamazawa, I believe you might be referring to "My Page" of Redmine where you could use widgets to decide what you see on that dashboard - keep in mind that such dashboard s project independent, so it can display issues from many projects that you are a member of on 1 screen.
For instance from My Page, you should be able to select an "Issues" widget to Add and set it up to pull a list of items to display using a saved custom query.
That should give you a snapshot of tasks at hand, without the need to click around the screen too much.
You may need to set up your saved query such that:
Description and / or
Last notes
are checked (if you want to see issues at a glance, without the need to open each one separately).
Alternatively, you can skip that "My Page" idea altogether, if you're ok with just opening a saved query with Description and / or Last notes selected.

how can I NOT include bootstrap css in shiny UI

I've got a team who has built plenty with shiny UI (and also shinydashboard) but I'd like to come through and restyle the entire set of apps we've built.
I can link to our css in a number of ways, but that's just setting a new css file on top of the bootstrap base css. *I have not found a way to just ditch the bootstrap css entirely. Is this possible? * Even setting theme to NULL seems to still keep that base css in there.
This causes issues of specificity that I have to overcome, which is annoying.
(I realize by ditching bootstrap I will have to recreate many styles they've defined -- and am losing some of the value of shiny, that's not a problem at this point for me)
The shiny package includes a function suppressDependencies which may be used to drop web dependencies. See ?shiny::suppressDependencies for more information. Unfortunately, I do not believe one can remove only the bootstrap CSS resource, instead one must remove all bootstrap related resources. This appears to be a result of how shiny handles resource dependencies, i.e. all the bootstrap related resources are bundled under the name "bootstrap" which suppressDependencies looks for and then drops entirely.
Limitation aside, I put together a small demo Shiny application showing how to drop the bootstrap resources.
library(shiny)
shinyApp(
ui = tagList(
suppressDependencies("bootstrap"),
tags$p("Hello, world!")
),
server = function(input, output) {
}
)

Listing customization ServiceNow

How can I personalize a list within ServiceNow?
I mean, I have this list:
But I think its very confusing to see the position on the right side.. How can I center it?
Like CSS customization or JS or something like that.. where can I find the customization form?
You can customise the position of the field content by using Field Styles.
If you mean customising the position of the field header, I have had a play around with doing this and I seem to have got it working.
If you inspect the HTML of the column header you want to target (the th tag), you'll see that there's an attribute on it called glide_type which contains in it the type of column. You can use this to create a CSS rule to target only headers of a particular type.
For example, I have a field of type decimal, and the th tag has the following attribute:glide_type="decimal". So to target that element, I could create a CSS rule like the below:
th.text-align-left.list_header_cell[glide_type="decimal"] {
text-align: right;
}
The hacky part is including that CSS so that it applies throughout the SN interface. You can use a UI Script to run some JavaScript which includes the Style Sheet. So if you put the above CSS inside a new Style Sheet (navigate to Content Management > Design > Style Sheets), and copy that new Style Sheet's Sys ID, you can create a UI Script with the below in it to include that Style Sheet on all pages:
link = document.createElement("link");
link.href = "STYLE_SHEET_SYS_ID_GOES_HERE.cssdbx?";
link.type = "text/css";
link.rel = "stylesheet";
link.media = "screen,print";
document.getElementsByTagName("head")[0].appendChild(link);
After doing that, you'll see that the Style Sheet is getting loaded on all pages, and if you've written your CSS right then you should find that the column header is now right-aligned!
As #Kirk said, performing this kind of customisation will mean that it's hard for ServiceNow Customer Support to assist if there's something you've customised getting in the way of their troubleshooting. Take this into account if you decide to implement something like this, and also thoroughly test this on a non-production instance.
In addition to the above, this solution may break in future releases as ServiceNow may decide to change the way that lists work and thus the CSS selector may no longer target the right/any element.
Hope this helps!
Dylan
It's not suggested to customize any sort of CSS or JS with that, we were told that is voids your support for that section if you do so.
You could just add a few more display fields if you really desire to remove the extra white-space.
For a complete description of that (which you may know how to do):
Click the Gear icon
Then select some relevant fields from the Available section, and click the Right arrow to add them.

How to edit plugin to use the theme's template files

I am using a theme called Hemingway, it's a great theme with three page layouts. (full-width, with sidebar, without sidebar). This is all working great. I can choose one of three options in page settings.
I'm also using the Projects plugin by Woothemes. This plugin makes it easy to add recent projects with a photo gallery and some other options. It's working when I'm using the shortcode:
[projects limit="12" columns="2" orderby="date" order="desc" exclude_categories=""]
I'm using this shortcode with two columns on a full-width template. This is working great, but when I'm trying to use the functionality to automatically add the content of projects to the page using the option built-in Projects:
The full-width template is not working and the sidebar is shown. Also the two column layout for projects is not working. They just aligned beneath eachother.
How it should look like (this example is with shortcodes):
http://hoveniersbedrijfameland.nl/projecten/
How it looks with the option in projects to choose a page: (this is wrong)
http://hoveniersbedrijfameland.nl/projects/
How can I debug this to see what breaks it?
What I tried so far:
I've tried the plugin to behave like I want. This means, that the
plugin will use the full page template for 'categories' instead of
using the archive page. I don't really know how the plugin is build,
so it's hard to eit the right file.
I've tried a workaround with url routing, but this isn't the best
approach.
I found a solution. I copied the archive-project.php file to my theme and edited the content with the ones in the full-width template. I need to style it myself because the pages are broken if I leave it like that.
If I want to edit page template now, I need to code it in the ffile instead of choosing it from the pages > page layout in the admin panel.
I'll fix that later.
FINAL UPDATE: I hardcoded everything and it's working for me now. I don't need any further help, I'm now looking into the custom post types to change the content template.

Set Qt tooltip area constraints programmatically?

I have a QWidget that has a tooltip set. The issue is, it's displayed on one huge line(the tooltip is quite large). I would like to put a constraint on the width of the tooltip, so it would be displayed on multiple smaller lines instead of a huge one. Is there a way to set this programmatically, in the C++ code?
Qt tool tip is HTML aware. You can design the tool tip using HTML tags
Here is a simple example
ui->pushButton->setToolTip(QString("<div style = 'background-color:yellow;float:left'> <p><b>test tool tip</p></div>"
"<div> <img src=':/someImage.png'></div>"
"<div style = 'background-color:red;float:left'> <p><b>test tool tip</p></div>"));