Closed Bug 481252 Opened 16 years ago Closed 15 years ago

Add a generic text-area "class" to ThunderHead

Categories

(Skywriter Graveyard :: Thunderhead, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED EXPIRED

People

(Reporter: danzat, Assigned: danzat)

Details

Attachments

(2 files, 5 obsolete files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020911 Ubuntu/8.10 (intrepid) Firefox/3.0.6 Build Identifier: c98268c8f4be A generic text-area "class" needs to be added to ThunderHead in order to replace (later on) the current editor implementation in Bespin. Reproducible: Always
Attached file The additional code to th.js (obsolete) —
This file contains two classes: 1. th.TextArea - a generic text area 2. th.Scrollbar2 - a slightly more general version of th.Scrollbar These classes can be added as is to th.js
One thing I forgot, and I did not include it so that th based stuff won't break. On th.js, line 234 (the only place in the file where a clearRect function is used) should be commented in order to enjoy the benefits of smart redraw. Also, on comment #1 there's a mistake, the code needs to be added to components.js and not th.js
Attached image Text Area diagram
This is a diagram I cooked up which I hope explains the weird terminology I employed in my code
Attachment #365267 - Attachment is obsolete: true
The patch contains: 1. Changes to components.js 2. A commented line in th.js (this does not seem to affect existing th based widgets, like the dashboard) 3. Files to test the the new TextArea: test.html
Text area now uses a model to store the data, and is plugged to a modified version of the Bespin actions. Modified because it has to be adjusted to the text-area.
Attachment #365516 - Attachment is obsolete: true
Dany, Before I apply the patch, I plan to eject isRowDirty on the editor model, which is (a) duplicated and (b) seems unnecessary for your patch to function. Why is it there?
This update includes many more "action" adjustments and now features navigation (complete) and selection. The only thing left is to adjust the undo/redo stack and a clipboard.
Attachment #365865 - Attachment is obsolete: true
Attached patch Tidied up the TextArea code (obsolete) — Splinter Review
Tidier version of the text-area widget. I think this will help people understand the code better.
Attachment #366398 - Attachment is obsolete: true
Dany, I went to apply the patch against the tip and it failed. I can fix the diff no problem, but I was planning on refactoring your changes and it would be easier if you did it on your end for me. Can you do this: - create a new directory front/js/thx - put textarea and your related test files into that directory? put both the model and the component in a file textarea.js thx!
There you go ben
Attachment #366638 - Attachment is obsolete: true
Committed, thanks.
From what I can tell, this is certainly confirmed. It may even be fixed already. Until someone can provide me with more information, I'm simply going to mark this as ASSIGNED to danzat. Will there be a TH component added to Bugzilla for these types of bugs, now that TH has its own repository?
Assignee: nobody → danzat
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Linux → All
Hardware: x86 → All
Version: unspecified → Trunk
Whiteboard: thunderhead
This is a mass migration from Mozilla Labs :: Bespin to Bespin :: Thunderhead.
Component: Bespin → Thunderhead
Product: Mozilla Labs → Bespin
QA Contact: bespin → thunderhead
Whiteboard: thunderhead
Target Milestone: -- → ---
Thunderhead is deprecated.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: