Closed
Bug 961553
Opened 11 years ago
Closed 11 years ago
Possible dead code on project name setting
Categories
(Webmaker Graveyard :: Popcorn Maker, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: thecount, Assigned: thecount)
Details
Attachments
(1 file)
We have a block of code like this:
if ( butter.project.name &&
( butter.project.id || butter.project.isRemix || butter.project.isBackup ) ) {
_projectName.textContent = butter.project.name;
}
I am questioning why we need all these checks. In what case do we have a name, but don't want to use it? According to the above logic, if we have a name, but we don't have an id, or are a remix, or are a backup.
I cannot find a case where we have a name that we don't want to use, and all the above checks are false.
Seems this is the commit for it: https://github.com/mozilla/popcorn.webmaker.org/commit/ac995db87e45fa35a1ed9b1b0295f180a9d3c941#diff-85acba044c90be814d446d2c6be9de45R423
I just want to go back to what it was, if we can. If we have a name, use it, if we have a name and we cannot use it, we have another problem as to why do we have a name?
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → scott
Assignee | ||
Comment 1•11 years ago
|
||
So, I'm not just trying to remove code for code removal sake, but I'm trying to reduce the number of states the app can be in. If we don't need some weird check for name, we don't need to worry if we're a backup or not, and thus don't need to store that data.
A backup should just be data loaded, and once loaded, it is simply a project.
Putting aali on this because of the initial commit, and Matt because of the addition of isBackup.
Attachment #8362303 -
Flags: review?(schranz.m)
Attachment #8362303 -
Flags: review?(ali)
Updated•11 years ago
|
Attachment #8362303 -
Flags: review?(schranz.m) → review+
Assignee | ||
Comment 2•11 years ago
|
||
Staged: https://github.com/mozilla/popcorn.webmaker.org/commit/239eaab6ab6cb49ce6f762a92f6efce7bf2ac5fa
Needs verification.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(scott)
Resolution: --- → FIXED
Updated•11 years ago
|
Attachment #8362303 -
Flags: review?(ali) → review+
Assignee | ||
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
Flags: needinfo?(scott)
You need to log in
before you can comment on or make changes to this bug.
Description
•