Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
We have a large web application in my office and we have a relatively large testing framework in place for the codebase (jsdriver and mocha). I'm pretty happy having a lot of the code tested (modules for web queries, controllers, etc.), but we have a lot of code that checks styling down to the pixel, which really bugs me. We have a lot of hard-coded values in the tests that make sure everything is where it's supposed to be.
For example, we have a widget A and another widget B inside of it. We then check if B is globally located properly in relation to its relative position and A's relative position. This means if we go into the styles and move something down a couple pixels, we have to go into the tests and change that hard-coded value by a couple of pixels.
This seems to create a very tight coupling of the style and tests, which I don't see a lot of value in. From an interface perspective, I see more value in testing things like is widget X visible when we move into this state. Is this a standard practice to so closely follow the pixel values? And if not, is there a better way to do it?
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am looking for a testing framework to kind of test the front end and design of my application. I am building an angular application and we are using Protractor for the end to end tests, however I was wondering how do we test the design and the actual layout.
For instance when my partner pushed code last week he broke the navigation menu barand we want to make sure we have automated test that makes sure that the css is not broken before we push it in to prod. I am open to all suggestions. I was wondering if protractor can be used for this or is there a a better tool?Protractor does give you ability to localte css elements by id etc but not sure if this is a smart approach.
It might not provide everything you need, but BackstopJS seems to be capable of handling CSS breakage:
https://garris.github.io/BackstopJS/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
As the title says, I want to 'purify' the CSS of my rails application, to find unused CSS selectors.
I found a gem called deadweight but is too old. I can't even install it today (Dependencies failing)
So, is there another or actual way to clean the CSS? or an alternative to deadweight?
Thanks a lot!
As mentioned in the comment, there is a good reason why you shouldn't be looking for such a tool - javascript. Even though, given selector might not exist in your templates, you might have some javascript which will add a class to one DOM element, an attribute to another and you might have another rare case which will add another class to another element or move it complete somewhere else inside the DOM.
To actually find whether your CSS selector exists or not, your tool would need to render all your templates and keep executing random js events until given selector shows off - and it will need to be able to tell whether it is ever gona find it. This is a halting problem, proved to be computable impossible to solve.
That being said, you can always use tools like the one listed on other answers - they might give you a list of suspicious selectors, however you will need to spend significant amount of time with every single one of them to find if there is a single case in your application when it can actually be used.
Word of warning: DustMe crawl the website through all the links on your page to get a better view of whole website - you don't use link_to ..., method: <post|delete|put>, do you?
Here are a few other solutions that might be worth trying:
dust me selector Firefox add on
Helium Tool
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
While Single-Page application approach is rising as a web development choice, I still don't understand, practically, how would losing the ability to go back/forward in the browser be an O.K sacrifice? Imagine Facebook without direct page navigation! Is there an essential/direct purpose for SPA I can't get my hands on?
You wont have to give up back button functionality to develop a single page application. HTML5 has a history api (and there's polyfills for older browsers) which allows your to keep back button functioning properly.
The main reason (in my opinion) to go for a single page approach is the more app-like feel it gives you. For example gmail feels more like an app than a web page, and given its purpose, I think that's way it should be too. Another example might be the pixlr online image editor.
Single page approach indeed doesn't suit every purpose, but when you want a webapp to feel just that, instead of a website, then single page might be the way to go.
You mentioned direct navigation in comments, and that's totally doable if it's something that makes sense in your context. Angularjs can do that, and I'm sure pretty much every modern single page framework has a way of implementing this.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What are the completely new things you can do with Flexbox which you wouldn't be able to do before in any way using only CSS (without markup changes). I understand Flexbox makes many layout issues much more straightforward and easier to maintain, but am also interested in knowing what unique features it brings that were completely impossible before. After reading some articles I still can't crystallise any thorough list in my mind, so far being able to come up only with 2:
Layout mixing items with fixed and relative sizes. In many cases it could be done using calc function (though it will quickly become messy), but I think some borderline cases can't be make up for without adding extra markup (or am I wrong an it can?)
Displaying things in the order completely independent from the source order
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
For a few days now i am looking for a webdesigners who can make my page look nice. All i can find is people that are making .psd files of websites so i can cut out elements and put them on my page. I don't need that. I want someone, who will visit my page, look through my .css file, remake it, and maybe add few graphic elements on site - like logo and/or some icons.
I would do it by myself, but i am very bad at selecting/coupling colors, so i need someone to do it for me.
So, reasuming: how do i search through google to actually find people that can make my page look good by remaking my .css files?
People still go by the umbrella term Web Designers : http://www.hanselman.com/blog/HireAndPayADesignerAndBeHappy.aspx
I generally search css web designers to narrow it down.
Altho this area may seem gray there are a few professionals involved on different aspects of what you want.
The reason behind the confusion is that the same professional might occupy more than one role.
A Web Designer should be be able to do that. And it is required of one the basic knowledge of CSS/HTML alongside with your description.
A Web Ui Engenier is the specialist on CSS/HTML/JavaScript he wont design the interface per say He is the guy who implements it.
And a Web UX Designer is the person who will design the user interface and experience. How it should behave and the UI engenier will implement it.