Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361024 - remove styling code in javascript
Summary: remove styling code in javascript
Status: RESOLVED WONTFIX
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 367970
  Show dependency tree
 
Reported: 2011-10-14 15:04 EDT by Susan McCourt CLA
Modified: 2015-05-05 16:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2011-10-14 15:04:23 EDT
We still have code, particularly in our various navigators, that style things while creating nodes.

Example:
} else if (item.Type === "Tag"){
	col = document.createElement('td');
	div = dojo.create("div", {style: "margin-left: 10px"}, col, "only");


These navigator margins need to be in CSS.
We should search js files for "style:"
Comment 1 Susan McCourt CLA 2011-10-14 15:05:08 EDT
we've done some of this in 0.3 when we are touching the code anyway.  This bug is for a real pass to try to get rid of all of them.
Comment 2 libing wang CLA 2011-10-14 18:19:56 EDT
(In reply to comment #1)
> we've done some of this in 0.3 when we are touching the code anyway.  This bug
> is for a real pass to try to get rid of all of them.

In git-status-table.js , I still have something like : dojo.create("div", {style:"float: left;", align:"left"}, actionCol, "last");
Those were to create command span on top of the log zone and rebase zone.
I was wondering if that piece of code should also use css style.
If we should literally remove all code like "style:", that one should count.
Comment 3 Susan McCourt CLA 2011-10-14 22:49:16 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > we've done some of this in 0.3 when we are touching the code anyway.  This bug
> > is for a real pass to try to get rid of all of them.
> 
> In git-status-table.js , I still have something like : dojo.create("div",
> {style:"float: left;", align:"left"}, actionCol, "last");
> Those were to create command span on top of the log zone and rebase zone.
> I was wondering if that piece of code should also use css style.
> If we should literally remove all code like "style:", that one should count.

that's a grey area as far as I'm concerned.
There are places where we set things as hidden or display block, and to me that is fine, we are trying to toggle something on or off.

The floats are kind of like that.  At any rate I'm hoping to help you with command spans in bug 360986, so that there's a clear definition for where command spans like that belong, and at that point, assuming it's a common definition, we'd use a class.
Comment 4 Susan McCourt CLA 2012-02-02 13:54:06 EST
marking RC2 time and risk permitting.
Lots of improvements have been made, but we haven't done an explicit global pass.
We should at least see where we stand.
Comment 5 John Arthorne CLA 2015-05-05 15:47:36 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html
Comment 6 John Arthorne CLA 2015-05-05 16:01:07 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html