Why does the angular-material `Getting Started` example not actually work? - angular-material

Is it just me, or is the angular-material "Getting Started" example broken?
On that page (link above), there's an inline codepen to show using angular-material. But the demo doesn't work! (In particular, I don't see a button to collapse the sidebar.)
Since I used this example in my started project, I spent quite some time troubleshooting it -- to no avail. Then, I realized the example itself it may be broken. And sure 'nuff, it is!
Does anyone know what the actual bug is, so I can work around it on my test app? It must have worked at some time; but I can't figure out why it's broken now.
Thanks!

That particular pen is working fine for me but I have noticed a few are not working, and it's due to the angular-material.js link being incorrect in the dependencies (under the pen's settings) the link provided redirects to the CSS.

This is intentional - the sidebar only becomes collapsable on smaller screens and is open on larger screens. Shrinking your browser window will show the collapse button.
That being said, the Getting Started page is definitely in need of an update. It is a good guide for a basic page structure, but the individual demo pages will be a lot better if you're looking to try out some of the components. (Every demo has a CodePen link to open an editable version.)

Related

Filter not working on Tablesorter 2.17.8 > probably my bad

Been working on getting the UITheme Widget (Bootstrap v3.x) version going to behave exactly the same as this. https://mottie.github.io/tablesorter/docs/example-widget-bootstrap-theme.html.
Paging & sorting are working fine. When I click on a search box in the 2nd row to type something, for some strange reason, the sort feature fires & as I type nothing happens.
Ive checked over the head code to compare with the documentation & they are the same. When I inspect with Chrome, I can see an additional class of table sorter-header-inner yet this is not in the code of the 2nd row (search row)
An example page with my code can be found here
It could very well be that I have not added a css file or something. Ive searched the files that come with the download above & can't seem to find any additional files related to a filter widget.
Would really appreciate some assistance getting this nailed.
Thanks in advance.
Todd
Thanks #Mottie, Little bit embarrassing & a trap for new players but I found myself inspecting elements & copying that code directly into the header. not following your documentation to the letter & simply having say English and letting all the magic happen behind the scenes... I'm probably not the first person to have tried this but hope other newbies benefit from me sharing

ShowShareSheet creates black/blank screen

Using DELPHI XE4/XE5.
Using an ActionList and Tbutton that is linked to the aciton: ActionShowShareSheet, the picture above is my result. I can not find a lot of troubleshooting around or many examples regarding the topic. I am trying to share an image with informational text - nothing to fancy - either by email or whichever the desired social sharing service is preferred by the user.
Yes, I have looked at the example provided by Delphi, and even attempted copying and pasting the same controls/components from that example.
edit ---
Okay, so I tested in in the iPad as well, it appears to show the popver modal but no items are shown to share with. So I am now facing two problems:
1. ShowActionShareSheet does not display properly with an iPhone device/simulator
2. I have nothing to share with, or I can't. I have signed into Facebook as a test via the iOS device settings and it still does not work properly.
Help ! Thanks
~ Simple solution. Just doesn't work in the simulator.

Selenium Web Driver Error

I'm getting a weird error while trying to click on a Capybara Element
I'm using find(:xpath,"//a[contains(text(),'Connect')]").click
(find(:xpath,"//a[contains(text(),'Connect')]").present? return true)
the error I get is:
Selenium::WebDriver::Error::MoveTargetOutOfBoundsError Exception: Element cannot be scrolled into view:javascript:void(0);
i did some research and the only solution i found is that setting the selenium version to 2.16 may fix this issue (i'm using 2.25).
anybody got an idea?
It may happen when the page being tested is not fit into the current window size. If you know such pages where usually these error happening, you may explicitly scroll down before doing the operation on such hidden elements(like click, clear etc). Here the code to explicitly scroll down the page.
In java,
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("javascript:window.scrollBy(250,350)");
From the times I used selenium webdriver to test .NET apps, I would get that error when the issue was exactly what it sounds like: It's looking for an object on the page that it cant scroll to for some reason. In my case it was because some dialogue boxes would appear without scrollbars and the driver had no way to "scroll the object into view"
Can you watch the execution of your test and see if that's the case? I had some luck rolling back to a previous version of firefox because 15+ was (as of about 2 months ago when I had the issue) unsupported by web driver and had this problem periodically. Rolling back selenium versions may help too.
First step though is definitely to watch the execution of the test and see whats happening though. And a good debugging idea may be to try to work through your steps manually yourself to make sure the test works by hand.
Its also worth noting that for the webdriver to be able to execute click the object actually has to be visible. IsPresent doesnt require that, it just searches the page files. Also an issue I ran into. IsPresent will still return true for objects that are not and cannot be made visible on the page (i.e. something at the bottom of the page that you cant see at the time)
Couple of tips here:
Webdriver should ideally be on the most recent update, it's what most use (Unless you're doing Ruby Automation)
Use css selectors, xpath (Whilst rendered), is almost always heavier on both resources and code.
Try defensive coding, first of all ascertain it exists. There are many ways to do that dependent on what package you are using. In ruby you would do page.has_css?('css_string')

Getting rid of double green lines in blog posts

I have a blog on Blogger, and sometimes, I notice that double green lines are automatically added below certain words, which will display an ad if you hover over it (see picture below). Is there a way I could permanently make these lines not show up (e.g. by adding code to the Blogger template)? I just noticed them being added to some of my posts recently, and I want them to go away forever.
This is most probably a browser plugin/gadget that is inserting these links, not Blogger. Disable, or better, uninstall the TextEnhance plugin/gadget .
See: http://wafflesatnoon.com/2011/10/05/seeing-unwanted-text-enhance-ads/
I was having the same text-enhance issue. It was installed on Chrome under the extension Premium-play codec c. Deleting the ext got rid of the adware.
To de-install this trojan horse, follow these steps:
De-install the following program(s) (go to the 'Add/Remove' section in the Control Panel):
--Pando media enhancer
--I Want This!
2) Apps/extensions for Chrome
*To remove extensions, type chrome://extensions into the omnibox/address bar
*To remove apps, go to the New Tab page > Apps panel > right click app you want to remove
--Premiumplay Codec-C (extension)
--Yontoo Layers (extension?)
--Rewards Gaming (app)
For Internet Explorer, disable the same extension(s).
I hope this helped banish this software from the internet.
Best regards and good luck!
When you get a pop-up, click on the name of the company that conducts the ads and you will go to their corporate site that has a disable link and it will effectively disable these links in any page that the company conducts business. Close and reopen browser and you will no longer see double line ads from that company anywhere on the internet. If you clear your cookies you will have to repeat this step, However, this is an easy way to stop the ads without corrupting your OS or browser. If you have to hack code and you don't know what you are doing you can damage a program or your computer beyond repair...If you know what you are doing then go forth and hack away.

Why does my CSS go screwy "sometimes"

A website of mine is behaving weirdly. The layout sometimes is fine, and sometimes it is screwy. An example page that I see the problem on is this one: link
Disclaimer: I have yet to start my investigation into cause in earnest. I am turning to Stackoverflow because I am lazy and I hope someone will say "That happened to me once, it is probably this...". So please, no one get stuck into this working out this issue if it is something you have never seen before, as it wouldn't be fair as I have not done it myself.
Ok, some background:
The problem usually (maybe always) occurs when first viewing the page
The problem does not show up always, only sometimes
When the page shows up munged, if you refresh it usually reloads looking as it should
The site is a rails app
The css is passed through the neat Smurf Gem, which automatically minifies the CSS and Javascript on the page.
The layout problems happen in firefox (both linux and winXP)
The CSS is served up in the production environment using the ":cache => true" option which concatenates all the css files into one file
Anyway, I am hoping that this has happened to someone before and it will be really simple to fix. If not, I'll go and investigate and return with the solution (or a request for more help).
Thanks in advance!
James.
[edit]I added the first two bullet points, inspired by the comments and first answer[/edit]
We have had something similar when using HAML and SASS that resulted in the CSS being completely unavailable. It only happened on deploys. We determined it was a combination of the Rails stylesheet merging and the generation of the CSS from SASS. Sass was not done generating the CSS, which it did so on the first request to the application, when Rails attempted to merge it all together. The result, a corrupt useless CSS file. Then we stumbled upon this article which has a solution for preventing this issue.
Based on all this, my best guess is that the Smurf gem is attempting to generate your file on the first request, but Rails is serving it out before its done. The generation completes then each following request is fine. If this is the problem then the only solution i know of is to get the file generated before the first request. Of course, this does assume that it is related to deployments or application restarts in some way.
Peer
I had such a problem. The problem was only at the first time the page was loaded. Just reload it and it was fine.
The problem in my case was that the images where not there in the cache for the first time so the browser didnt know it's dimensions when preparing the page which caused the problem
If an image doesn't have a height/width assigned to it, a place is created on the page and it's put there. If the image doesn't quite fit, the browser may not know this until it's refreshed. Then it already knows the size and can properly fit it onto the page.

Resources