Closed Bug 710925 Opened 13 years ago Closed 12 years ago

Add edit menu to the style editor

Categories

(DevTools :: Style Editor, defect, P2)

10 Branch
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dcamp, Assigned: miker)

References

Details

(Whiteboard: [review+])

Attachments

(2 files, 3 obsolete files)

Seems useful/mandatory for navigating a large stylesheet.  Paul has been asked about this a couple times on twitter.

Mihai, is there decent support for this in Orion?
As paul mentioned on irc, Find is what we really need.  Replace can be left for a followup.
Summary: Implement find and replace in the style editor → Implement find in the style editor
Assignee: nobody → mratcliffe
Depends on: 650345
This is not going to be fixed by bug 650345. Based on a technical decision now the Style Editor needs an Edit menu with UI to access the Find and Find again commands. Bug 650345 adds all of the functionality needed into the Source Editor and you can see how I added the commands to Scratchpad - should be easy to do the same with the Style Editor.

Please let me know if you have any questions. Thanks Mike!
Status: NEW → ASSIGNED
Blocks: 719409
Will this bug also cover "jump to line"? or does that need a separate bug?
The patch from bug 684445 adds a default context menu to the style editor and it makes changes to the styleeditor.xul file as needed. Mike, I suggest you look into that patch - I believe you need those changes for your work with the Style Editor Edit menu. With that patch applied you have less work to do: just add the menupopup with the xul:menuitems with the right commands and keys associated - most commands and keys are made available.
Wow, that is a dependency tree
Depends on: 684445
Updating the title of this bug so that it matches the direction that this bug has taken.

The edit menu has the following items:
- Undo
- Redo
- Cut
- Copy
- Paste
- Select All
- Find
- Find Again
- Goto Line
Summary: Implement find in the style editor → Add edit menu to the style editor
Attached image regular menu
I think menus inside a toolbar looks 'out of place'.
How about a regular menu like this attachment? (and we can add File in a follow-up)
ie.(In reply to Cedric Vivier [:cedricv] from comment #9)
> I think menus inside a toolbar looks 'out of place'.
> How about a regular menu like this attachment? (and we can add File in a
> follow-up)

The regular 'full' menu will be only shown when the Style Editor is extracted in its own window.
Attached patch Edit menu with no styling (obsolete) — Splinter Review
I was asked to remove all styling so I have logged bug 727794 for this.
Attachment #597772 - Attachment is obsolete: true
Attachment #597773 - Attachment is obsolete: true
Attachment #597784 - Flags: review?(mihai.sucan)
Attachment #597781 - Attachment is patch: false
Attachment #597781 - Attachment mime type: text/plain → image/png
Also as we discussed on IRC, we might prefer to rely on context menu in the editor only, to keep the UI light.

Asking feedback to shorlander.
Attachment #597773 - Flags: feedback?(shorlander)
Attachment #597781 - Flags: feedback?(shorlander)
Attachment #597773 - Attachment is obsolete: false
The initial description of the bug seems to be primarily about exposing 'Find' - having a searchbox at the right of the editor toolbar might be more discoverable and less noisy.
Attachment #597773 - Flags: feedback?(paul)
Maybe, but the jump to line etc. are not very discoverable
I have moved the edit menu to the top a la scratchpad.
Attachment #597773 - Attachment is obsolete: true
Attachment #597784 - Attachment is obsolete: true
Attachment #597773 - Flags: feedback?(shorlander)
Attachment #597773 - Flags: feedback?(paul)
Attachment #597784 - Flags: review?(mihai.sucan)
Attachment #597850 - Flags: review?(mihai.sucan)
Attachment #597850 - Flags: feedback?(shorlander)
Attachment #597850 - Flags: feedback?(paul)
Comment on attachment 597850 [details] [diff] [review]
Edit menu with no styling

Review of attachment 597850 [details] [diff] [review]:
-----------------------------------------------------------------

/me likes! Thanks for your patch Mike!

Pending UI review/feedback from shorlander, this can land. If shorlander decides we need to move these commands into the context menu - to not add a new Edit menu - we can do that easily in bug 684445.

Shorlander: please check this stuff and let us know what's the best way to go forward with the Style Editor UI. Thank you!
Attachment #597850 - Flags: review?(mihai.sucan) → review+
Whiteboard: [review+]
Comment on attachment 597850 [details] [diff] [review]
Edit menu with no styling

For Linux and Windows, we can't get an additional toolbar.

80% of the original toolbar is empty. Here, we're adding another toolbar that is 90% empty.
This is a waste of space. Also, this won't work once the StyleEditor will be located in the sidebar.

I understand the rational here, but adding a toolbar doesn't look like the right approach.
A context menu sounds better to me.

But then comes the discoverability problem:

These options:
- Undo
- Redo
- Cut
- Copy
- Paste
- Select All
…don't need to be too much discoverable since everybody already know how to use them.

About these items:
- Find
- Find Again
- Goto Line

Find and Find Again use the same binding as the browser. About Goto Line, I believe that the user will need to use the context menu before needing these features, so he will learn about it sooner or later.
Attachment #597850 - Flags: feedback?(paul) → review-
Discussed this with robcee ... we can just use a context menu instead.
yeah, I'm inclined to go with a Context menu here unless we have more than just an Edit menu in the menubar. It also becomes easier to manage when the Style Editor's docked in the browser; we don't have a bunch of menues that we need to somehow wedge into the main browser UI. And it forces us to keep things simple with just the context menu and eliminates the need to add custom styling for menubars.
Agreed. I also discussed this with Rob and I'll update the patch for Bug 684445 to include Find, Find again and Jump to line in the default list of Source Editor context menu items.
Comment on attachment 597850 [details] [diff] [review]
Edit menu with no styling

Review of attachment 597850 [details] [diff] [review]:
-----------------------------------------------------------------

(In reply to Rob Campbell [:rc] (robcee) from comment #19)
> yeah, I'm inclined to go with a Context menu here unless we have more than
> just an Edit menu in the menubar. It also becomes easier to manage when the
> Style Editor's docked in the browser; we don't have a bunch of menues that
> we need to somehow wedge into the main browser UI. And it forces us to keep
> things simple with just the context menu and eliminates the need to add
> custom styling for menubars.

I agree with all of that.
Attachment #597850 - Flags: feedback?(shorlander) → feedback+
(In reply to Mihai Sucan [:msucan] from comment #20)
> Agreed. I also discussed this with Rob and I'll update the patch for Bug
> 684445 to include Find, Find again and Jump to line in the default list of
> Source Editor context menu items.

As we are all in agreement and Mihai has updated the context menu in his updated patch for bug 684445 I will close this bug?
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Attachment #597781 - Flags: feedback?(shorlander)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: