Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Bastard posted:

It has several items with different links and text, and needs to be reused every month.

Make it look right in a phantomjs screenshot and use an image map like kedo suggests.

This reminds me of a bug report I've been ignoring that basically amounts to "When we copy and paste HTML from our site into Outlook (and Gmail, maybe - it's unclear) and the customer tries to click the image on an iOS 4 device, it doesn't go to the link, it just asks them to save or share the image" and I can't even begin to fathom how they expect me to fix that or why I should care about the email client in a dead mobile OS*.

*Actually I know exactly why they think I should care: one of our biggest customers just bought iPhone 3Ss for all their sales reps in TYOOL 2014 loving lol

Adbot
ADBOT LOVES YOU

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



fletcher posted:

Is there some sort of minimalist self hosted Youtube clone I can host on my own server? I want to upload whatever the hell videos I want without worrying about Youtube taking it down or something because I sampled the wrong piece of music.

http://www.videojs.com/ for display
https://www.ffmpeg.org/ (or possibly http://handbrake.fr/) for conversion
http://www.dropzonejs.com/ for friendly uploading

I'm not aware of a project that glues them together on the back-end, though

E: poo poo, that'd be right in my wheelhouse. Wish I had more free time :\

Munkeymon fucked around with this message at 18:02 on Jul 9, 2014

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



fletcher posted:

I'm tempted to spend a weekend doing it, I thought for sure somebody would have done it already tho.

This one looks pretty nice but has a lot more functionality than I'm really looking for: http://mediadrop.net/

Maybe static html + <video> tag is the right solution for me

There's really no reason not to use video.js because it'll do nice things like fall back to flash for IE 8 or 9 users and I think you can just point it at a video tag on a static page to get that feature, but haven't tried that specifically.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



I've got a CSS problem I'm not sure how to even google. I want to make this (or something like it - I can change the markup):
code:
<div>
    <span class='big-text'>HUGE</span>&nbsp;<span class='normal-text'>normal</span>
</div>
render like instead of HUGE Normal

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Kanpachi posted:

Oh hey, the actual intended use for vertical-align: middle.

http://jsfiddle.net/3thK7/3/

Why the gently caress does putting it on the first one change the other... oh never mind. loving CSS.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Suspicious Dish posted:

Not really?

http://jsfiddle.net/3thK7/9/

I don't pretend to understand CSS.

It looks to me like the tallest thing in a line sets the baseline, because if you add another, even bigger bit of text at any point in the line, everything goes back to being bottom-aligned again.

I think if I had a time machine, I'd kill everyone on the CSS committee and leave a note reading "Consider using a constraint system instead!" before I got around to Hitler and whatnot.

E: wait, no, the vertical-align: middle'd thing looks like a sub WRT to the bigger text and the normal text is on the baseline :wtc: Time machine murder fantasy still holds.

Munkeymon fucked around with this message at 22:17 on Jul 24, 2014

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Lumpy posted:

Use flexbox and say screw you to IE!!! Or use flexbox with inline-block fallover: http://jsfiddle.net/qzk5Q/1/ (take out the flexbox stuff to see what IE < 11 sees)


Just think, in like 4 or 5 years, we'll actually be able to use flexbox.....

(edited to make the text in the fiddle HUGER!)

I don't know why they picked the name 'flexbox' but I guess it's easier to type than 'use-a-layout-algorithm-rather-than-a-convoluted-annoying-puzzle-game-on-this-element' :allears:

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Kobayashi posted:

Good info, thanks. The proxy is probably a bit overkill for my needs. A lot of what I want to do boils down to adding a little empirical weight to my subjective observations. For example, instead of simply telling a client, "hey, you're really hurting the user experience by using multiple redirects," I want to quantify the effects. I wish it wasn't so dorky to find an area with poor network reception and plop open my laptop, but if that's what it takes to make my case, that's what I'll do.

In addition to what pokeyman said, if you can get DD-WRT on a router, you can limit the connection speed by MAC address which is great for simulating a slow network on one device. Don't know if you can simulate latency, though.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Thermopyle posted:

My question is, how should I allow the consumer to request this optional output? I can do URLs like:

1. http://blahblah.com/place/1/special_output/
2. http://blahblah.com/place/1?special_output=true

or what?

If it's just personal preference I think I'll go with #1 as I prefer the cleaner look of urls without query parameters, but if there's a standard for REST API's (that I can't seem to find right now), I'll stick to the standard.

I'm not aware of standards around this - I just see "X is optional" and think immediately of the query, not the path. You've gone one farther and said "X is optional and just modifies the output". /place/id?xml=true is a clearer logical parallel that I think makes the the case a bit better.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



MrMoo posted:

However ?xml=true is a special case when a HTTP header should be used instead, Accept: application/xml versus Accept: application/json.

Yeah, you're technically right, but doing that from a browser is kind of annoying and could behave in unexpected ways, and that's the perspective I'm coming from/assuming. The server could easily just check both to be a more friendly API, I guess.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



The Merkinman posted:

Even if you get it resolved, note that autoplay will not work on iOS or Android

IIRC this changed for iPads on iOS 7, so I think most iPads will autoplay. I'd check but our test pad is missing, probably because one of our BAs thinks it's his in spite of all the sharpy BRING THIS BACK WHEN YOU'RE DONE messages on the back :(

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



I'd like to change out a Font Awesome icon based on a parent class. So something like
HTML code:
<div class='on'>
   <i class="fa fa-toggle[-on|-off]"></i>
   <!-- other things affected by on-ness are also here -->
</div>
And can't think of a way to do this without integrating bits of the FA CSS into my own, which strikes me as a bad idea.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



kedo posted:

Looking for opinions.

After quitting my full time job to start freelancing full time I find myself with a lot of open time. I have several projects that are proposed and will probably be kicking off in a month or two, but in the mean time I've run out of productive things to do. Thus, I'd like to tackle a new language or framework or CMS but am having a hard time picking one to dive into.

My expertise is primarily on the front end (which I've been doing for about 13 years), and I have a super solid grasp on HTML, CSS, JS and know enough PHP to be dangerous. I've been working with WordPress so long that I can do pretty much anything a client might want with it, but I worry that I'm pigeonholing myself. Learning a new language altogether is intriguing to me because someday I'd like to handle a bit more of the backend side of projects than I do now. Being able to develop native apps is also an exciting idea. However I have no real training in programming and am having a hard time figuring out what I want to jump into.

I'm looking at Ruby and Python right now because they seem a lot more useful in the long run than something like PHP. Any thoughts? Someone point me in a good direction.

ASP MVC :v:

For real, though, Microsoft actually makes a decent web framework these days

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Anyone have a cool trick to simulate the fill-available(I think?) value for max-height that also works on IE 8?

For a concrete example, can anyone show me how to make the ul scroll in this example without changing how any of the other elements are intrinsically sized by their content in http://jsfiddle.net/scwd2wz7/3/ ?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



caiman posted:

The lack of response to my Velocity.js question makes me wonder: is anyone using Velocity.js? I just recently discovered it by way of this article. I haven't personally done any performance comparisons, but apparently it outperforms not only jQuery's .animate(), but also CSS animations. The performance section on this page is pretty convincing.

That just makes me wonder why the Velocity people didn't just contribute a new animation stack to jQuery :confused:

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



bawfuls posted:

Perhaps there is an easy way to do this in wordpress that I've just never been able to find? Or maybe there's another tool out there that's more appropriate?

Wordpress has plugins and there are a bunch of them for making tables display nicely: https://www.google.com/search?q=wordpress+table+plugin

Look at those and see if your dad likes any of them

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Chenghiz posted:

the cdn going down

HTML code:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="mahsite.com/scripts/jQuery-1.11.1.js"><\/script>')</script>
:v:

Because the time the browser spends waiting for that to 404 can't possibly be significant, right?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



fuf posted:

uh is that sarcasm? Because that is exactly how I load all my js libraries :shobon:
(try to load from a cdn, check if it loaded, if it didn't fall back to a local version)

No, network errors can sometimes be really slow to resolve to an actual error state, but, on the bright side, they're also really unlikely to happen with a big CDN, so it's probably not abjectly horrible or anything.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



fuf posted:

Speaking of software:

I've been using Linux for a long time but I'm thinking of switching to Windows, and I'm wondering how I'm gonna preserve some of my workflow. Any Windows users here who still use command line tools like grunt, bower, ssh, git etc? How do you do it? I guess I should just run a virtual linux machine?

CygWin with http://sourceware.org/cygwinports/ to round out anything the mainline CygWin is missing

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



There's also https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.contentEditable

lmao at the list of IE bugs at the bottom, though. I hear they've got a lot of devs on their voting site asking for Dart support for their backwards pile of bugs and weird rendering quirks. That'll end well, I'm sure.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



I've got three users with a really weird problem where IE 11 is treating any mention of localStorage in a script as a syntax error and spitting out the message "an internal error occurred in the microsoft internet extensions". Googleing that turns up a lot of dead ends and some kind of scary fixes like downgrading IE or reinstalling WinSock stuff (really :confused: at that one). Has anyone here ever seen this before?

The only way I can think of to work around this is to move all mentions of localStorage off into a different file that creates a global object, but that's a silly thing to do just to work around a few users' broken browsers. This could all be caused by some stupid malware for all I know and I'd hate to have to jump through a bunch of silly hoops for some loving IE malware.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



That sounds like a completely different problem*, but I'll pass it along and see if it fixes anything.

* To elaborate, if I try to reference localStorage at all, script evaluation aborts. I can't even do if (localStorage) {. Hmm, now I wonder if window['localStorage'] works...

E: nope! Same behavior

Munkeymon fucked around with this message at 21:52 on Oct 10, 2014

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.




That's interesting, but our domain doesn't contain any of those reserved words. Also I think he gets a different error but isn't very clear about that.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



caiman posted:

Reddit seems to be a messy hodgepodge of random bullshit. My idea is more fine-tuned. Just images and captions. Like a New Yorker style caption contest, only ongoing.

So http://imgur.com/hot/viral ?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



revmoo posted:

Ok I lied that I had finished that menu apparently it doesn't work in iOS. AFAICT it's a touch issue. I'm using the typical unordered list markup structure and CSS hovers with display: none/block to do the actual dropdowns. If I use iOS safari I can click the menu headers and they open up, and when I click a menu item it darkens as if the hover event and then click event are registered, however it simply sends the click/touch through the menu into whatever is beneath it.

So the menu appears to work and register click events, it's just that when I click an <li> it registers on the element underneath the menu. Ideas?

CSS code:
//the following line is a workaround for JS event handlers not firing on small-screen iOS
-webkit-overflow-scrolling: touch; //No, seriously.  Also, gently caress you Apple.
Try that on the whole thing's parent element and please leave the comments as-is thanks ;)

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Every time I think it's safe to stop caring about IE < 10 I get an email about a client using 8 or 9 and :smith:

revmoo posted:

Well that isn't it, I tried putting it in the menu parent and then putting it in every single menu-related CSS rule and nothing.

If it helps, for some reason when I click on the menu header it pops in/out/in super quick. It wasn't bad enough to bother me UX-wise, but maybe it's a factor in what's broken.

That's frustrating because it sounds familiar from the last time I made one (only a couple months ago!) but I can't remember what the cause or fix was. I thought it was that stupid CSS thing, but I guess not.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Captain Pike posted:

I would like to "stream" a song in iOS Safari, while using as little memory as possible.

My web page uses a great deal of memory already, and the client wishes a fairly long song to play in the background. (This is a promotional entertainment page, sort of like a video game.) If the song MP3 file is seven megs, I do not wish seven megs of memory to be used.

Because iOS 7 Safari will crash at a fairly low memory limit, I would love to be able to 'stream' the song, as opposed to 'progressive download'. That is to say, I wish the buffer to only hold a small portion of the song at a time. (Whichever part is playing).

So far I have found something called 'Byte Serving' for use with HTML5 ausio, and I it looks like HLS MP3 is even possible. Is there a good solution to my problem?

https://developer.apple.com/library...eStreaming.html may or may not help you avoid hitting the memory limit. It's really up to the browser either way since it doesn't technically have to keep much of an MP3 in memory to play it back. You could also try messing with the https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement interface which might even be supported on iOS.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Would this

CSS code:
#menu ul {
	max-height: 0px;
	overflow-y: hidden;
}
work right with the rest of your layout? Instead of display: none, I mean.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



revmoo posted:

That just makes all the various dropdown menus visible.

Derp. OK, I'll just paste in from my CSS because the SASS plugin is better at translating than I am:
CSS code:
#menu {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-transform-style: preserve-3d; }
  #menu ul {
    max-height: 0px;
    overflow-y: hidden; }
  #menu > ul {
    max-height: 100%; }
    #menu.closed > ul {
      overflow: hidden;
      max-width: 0px;
      max-height: 0px; }
I think that's all the top-level stuff that hides/shows the whole menu which looks like the structure in http://jsfiddle.net/scwd2wz7/3/

Mine has sub-menus, so there'll be some cruft to work around that left over, but basically I'm setting max sizes and disabling overflow instead of doing a display: none because I want to animate the expand/collapse which isn't possible with the display property. I also didn't have the same problem you had or if I did, I had it quite early on and forgot about it.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Kobayashi posted:

Allow? Pinch to zoom is core browser functionality. You have to explicitly tell the browser to disable it. You have it exactly backwards: Instead of disabling zoom and "building around the use cases," you should leave it alone and think about why you would want to stop people from zooming.

Because it's almost always more annoying than a well-made responsive layout?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



pokeyman posted:

If your "well-made responsive layout" is indeed made well, nobody's zooming it. There's no need to disable zooming.

Kobayashi posted:

If you think responsive design somehow means you should disable zoom, you're doing it wrong.

We've all found a site that looks pretty responsive but if you accidentally scroll just a little too diagonally you find that some random thing has overflowed the intended page width and now you can 'zoom in/out' a whopping 2% or hide a column of text accidentally, which is just annoying and could have been elided if the dev had used that header instead of hoping his layout was universally correct, which is an insane assumption. I'd rather just slap a header on the page and save myself some frustration, but I also hate fighting CSS quirks. I guess if that's your bag, then cool, but good luck.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Kobayashi posted:

So someone else fucks up their implementation and you conclude that you should cripple your implementation by disabling zoom? I don't understand that mentality at all.

No, I conclude it's a shitload easier than finding CSS hacks to make the layout perfectly uniform across all browsers, which it probably is for anything non-trivial.

Question to you: what am I adding to the UX by leaving this functionality enabled when it's not even supposed to be doing anything?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



fletcher posted:

I'm in the process of rewriting Awful Yearbook but I'm not sure what to do about the UI. I can code it up just fine if I had a mockup or something to work off of but I feel like anything I design myself is gonna look like poo poo. I don't want it to end up looking like some boring generic bootstrap looking thing that I see on 99% of sites these days. Any advice?

Ape the forums' style as much as possible

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



pokeyman posted:

It never occurred to me to wonder what the opposite of "a responsive design" is. I'm not sure unresponsive fits very well (though obviously I knew what you meant), is there another term that people use?

I get "broken on my phone" a lot

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Just wanted to add that one time at the old job I did an e-signature thing and one of the requirements was that the page had to make them check a box (literally input type="checkbox") before clicking the submit button for some reason and I've noticed since that this is a very common pattern for similar forms.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



If you map a filesystem in Chrome's dev tools and start messing with the CSS values from mapped style sheets, it will save the changes automatically. That is, without me hitting a button that says "yes, I'd like to write this fuckery out to the file right now". It just obliterates whatever's there :catstare:

Good thing I found this out with a file I had open in the editor at the time cuz otherwise I'd be pissed. It does keep the structure of the file the same, but I use that UI as a scratch pad to mess around with changes that I don't want saved, so to me that's a totally irresponsible and insane decision - especially since there's apparently no explicit save.

So heads up.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



MasterSlowPoke posted:

I'm writing a little single page rails app to teach myself ajax, and I have a question. My app returns data as json objects. I'm supposed to plug this data into a template, but I don't want a placeholder template to show on the screen. Where is the conventional place to store the template's markup? Should it be in a data attribute, or a hidden element of the page? Or somewhere more obvious that I'm not seeing?

Depends. If you're using a library like Knockout, they have a nifty thing where you can put templates in script nodes and bind to them and it looks like the (probably) more popular Handlebars does the same thing. So probably use one of those and do it that way.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Pedestrian Xing posted:

How do I handle an embedded browser (webkit 534.34 :negative:) rendering poo poo weirdly? I've tried normalize.css but it still displays basic stuff like fonts and absolute positioning incorrectly.

Make a whole different style sheet and possibly markup for it and tweak it/them until they look right. Embedded browsers are near-universally terrible.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Pedestrian Xing posted:

I've done some of that, mostly in the form of 'if in embedded, $(".whatever").css...', but the bigger problem I've found is that libs like jqueryui aren't working properly and are positioning elements in weird ways.

Yikes. Hope you've got a lot of time budgeted for this :(

Adbot
ADBOT LOVES YOU

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



revmoo posted:

TBH it's going to be easier to redo the layout in a way that works both places. Chances are if one random browser is rendering an element wrong then you probably didn't go about it the right way in the first place. I'm going through this now on a project where stuff renders bad ONLY in iOS Safari and nowhere else.

I assumed he meant an embedded hardware browser like a smart TV or something similar and if that's the case, he could have totally valid everything and it might not matter.

For some background, I was on a smart TV project back when Samsung first started making them. The 'browser-based' UI would key out elements set to certain background colors (or maybe just transparency levels - it was a while ago) and whether any CSS rule worked right was a total crapshoot. Anchor tags didn't do anything except change the style of the text so you had to use JS events to trigger navigation. I was so glad I was only on the project to help with JS stuff.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply