How to add external styles to Bit dev application or components - frontend

Within bit.dev, how can we import external stylesheets into bit.dev as we have an external styleguide we would like to import into our components within bit.dev. We are only using lit-elements within our application so theme providers are not an option. (Well, still cannot use external stylesheets).
I was hoping we could just import an external link within the .mdx files so we can preview components with the external styles applied. But to no luck. Any ideas or direction anyone can point us in?

Related

Altair Offline Rendering

How can I create interactive charts that can be shared to others with limited internet connection?
My situation is such that I can generate and view the interactive charts I want, but due to VPN restrictions, my colleagues are not able to open the html charts that I generate. From the error message below, it seems like they are not able to render due to inability to connect to the web.
(error loading script https //cdn.jsdelivr.net/npm//vega#5 noext)
Interactive Altair/Vega-Lite charts require several javascript libraries to render the charts; in most cases these libraries are loaded from an external CDN, and so the chart will not be viewable without an internet connection.
You can get around this using the altair_saver package, which is able to save HTML charts in "inline" mode, where the required javascript libraries are embedded directly in the chart output.
For example:
import altair_saver
chart = alt.Chart(df).mark_point() #...
altair_saver.save(chart, 'chart.html', inline=True)
The resulting file can be viewed in a javascript-enabled web browser, and should work even without an internet connection.

Custom SharePoint Responsive Master Page

We had a responsive html that was made responsive using bootstrap. Using Design manager i created a master page from it. Every thing works fine except 2 things.
Global Navigation doesn't match the UI, So i have applied all bootstrap classes using jQuery. Menu seems good later but at time of loading it looks bad.
When i go to add an app page, It shows only 4 apps. Search over there is not working as well as "Apps you can add" option is not visible on the page.
Can you provide exact steps that are to be followed in order to get it working fine?
For the part of question related to global navigation what you can do it in two ways.
Hide the global navigation using css first. Apply the bootstrap classes using jQuery and then show it on page to avoid loading effect.
Try to pull global navigation data using REST and generate html and append it on page using jQuery. Try this link : https://sharepoint.stackexchange.com/questions/116393/get-links-from-sharepoint-2013-global-navigation-using-rest

Find specific resource filtering by name - Chrome extension

I'm trying to make an extension that is able to find a specific resource loaded by the page, filtering by name and downloading it. The reason I want to do this is because I usually go to the network tab in the developer tools, filter the requests/responses, for example, looking for one with the word "foobar" in its name, and open the link in a new tab so I can download it (it's an xml file).
I was wondering if this could be automated with an extension, even if the word used to filter is hardcoded.
I don't have any experience with chrome extensions, so I wondered if this could be done or if it's just not possible with the devtools api. In case it could be done, if you could give me some guidelines on how to make it I would really appreciate it.
Thanks!
There are several ways to access the information you need in an extension.
You can write a Dev Tools extension. In that case, you have access to chrome.devtools.network API which will provide you that information.
This requires you to open Dev Tools and interact with your own UI there (such as an extra tab in Dev Tools).
You can go low-level and use chrome.debugger API to attach to a page like Dev Tools would. It's a complex topic, I'm just pointing you in that direction.
Since you rely only on filtering by name, not response itself, you can use chrome.webRequest API to intercept network requests and log those that interest you for processing. This is probably simplest to do.

OpenLayers's CSS breaks after publishing to Azure Web Site

I've created a very simple ASP.NET 4.5 MVC4 web site which uses OpenLayers 2.12. It's got only one page that shows a map with a few points and lines on it. If I run it locally, it runs fine, but after publishing to my Azure Web Site, the OpenLayers' CSS files won't load. I have now added the OpenLayers CSS hard coded in my bundleConfig, and now it works fine. But of course, this is not what I want, because OpenLayers has specific CSS files for other platforms and browser versions etc.
Locally, I just have to include openlayers.js and OpenLayers then adds the right css files. Does anybody know why this doesn't work after publishing to Azure?
From the docs in openlayers.js:
Please remember that when your OpenLayers script is not named
"OpenLayers.js" you will have to make sure that the default theme is
loaded into the page by including an appropriate <link>-tag,
e.g.:
(code)
<link rel="stylesheet" href="/path/to/default/style.css" type="text/css">
(end code)
Because Azure changes the file names that are included, I indeed should be adding the reference to the default style myself. Also, I can just link to style.css, the other css files for e.g. IE6 or Mobile won't be uses automatically, these are just there for yourself to use it when appropriate.

Using the UP1 Mobile Controls how can you create a link to an external web site?

Using the Outline control in a mobile page and setting it's href to a URL doesn't seem to work for me. Moving to another mobile page does in fact work. The older OpenNTF controls used to support this and I am wondering if I am missing something as you would think that this functionality would be supported.
The basicLeafNode is used to create a node that contains an external url.
If your pointing to a different server you need to use the full http:// format.
If your pointing to a different nsf on the current server you can use the /.ibmxspres/domino/filename.nsf format

Resources