?

Log in

No account? Create an account
September 23rd, 2005 - LiveJournal Development [entries|archive|friends|userinfo]
LiveJournal Development

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

September 23rd, 2005

Removing redundant code: s1shortcomings [Sep. 23rd, 2005|01:09 pm]
LiveJournal Development

lj_dev

[bradfitz]
Here's a sneak peak at the future. Well, it's not that monumental of a future, but I wanted to make an official post about it and gather feedback before it's on by default....

For a long time now we've had three redundant (and thus annoying) codepaths:

-- talkread.bml vs S2's EntryPage
-- talkpost.bml vs S2's ReplyPage
-- /view/index.bml vs. S2's MonthPage

As you may or may not now, the bml files are used when your style is S1, and S1 can't natively handle those view types, so it "falls back" to BML.

But because those three pages are implemented twice, once in BML and once in S2, we wanted to remove the redundancy.

Introducing the "s1shortcomings" S2 style

So I had The Intern (who just posted about his portal), make a new S2 style that mimics the look of the BML pages, and only implements EntryPage/ReplyPage/Monthpage .... then instead of falling back to BML, you can fall back to a special S2 style.

This even works if you normally use S2, but disable the S2-specific entry/reply views in favor of "BML".

For now, you can test the new BML-look-alike ("s1shortcomings") S2 look using the ?fallback=s2 URL. Soon it'll be the default, then the BML pages will be removed from cvs.

Here are some sample URLs, before and after:

http://www.livejournal.com/users/i_am_s1/436.html
http://www.livejournal.com/users/i_am_s1/436.html?fallback=s2

http://www.livejournal.com/users/i_am_s1/2005/09/
http://www.livejournal.com/users/i_am_s1/2005/09/?fallback=s2

Oh, and I almost forgot: this project is what led to S2 being able to do quickreply... because we had it in BML land, we needed it in S2 as well. So now any updated S2 style can do inline commenting if it wants. You might've already noticed it on a few of the system styles that have been updated. Patches welcome for any of the rest!

Comments welcome.
link75 comments|post comment

navigation
[ viewing | September 23rd, 2005 ]
[ go | Previous Day|Next Day ]