haikuwebkit/Source/WebInspectorUI/UserInterface/Images
Harshil Ratnu f3b9a1b534 Web Inspector: add contextual documentation for CSS properties
https://bugs.webkit.org/show_bug.cgi?id=226883

Patch by Harshil Ratnu <hratnu@apple.com> on 2021-07-02
Reviewed by Devin Rousso.

Overview: Add contextual documentation for all supported CSS properties in Styles and Computed panel within Web
Inspector.
Details: Add an info button which appears next to the property field on Hover. Clicking on the info button shows
a popover with the documentation for the property. Tabbing out or clicking anywhere other than the value field
dismisses the popover.
Architecture: Add a ContextualDocumentationButton in SpreadsheetStyleProperty and append that to the end of the
property content. This Button, when clicked, creates an instance of the ContextualDocumentation.js which will
search the ContextualDocumentationDB to find the related property and it's relevant details. Embed these details
in an instance of Popover.js and present next to the associated propertyName.

* Localizations/en.lproj/localizedStrings.js:
* Scripts/copy-user-interface-resources.pl:
Add details for the ContextualDocumentationDatabase from External Folder to build properly.

* UserInterface/Base/Setting.js:
Add setting to show syntax in documentation popover and define default state as false.

* UserInterface/External/ContextualDocumentationDatabase/ContextualDocumentationDatabase.js: Added.
* UserInterface/External/ContextualDocumentationDatabase/LICENSE: Added.
* UserInterface/Images/InfoIcon.svg: Added.
* UserInterface/Main.html:
Add and link new files.

* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .property:not(:hover) .go-to-arrow):
Remove absolute positioning from go-to-arrow button to align it with rest of the text in line and style it
similar to contextual-documentation-button.
(.sidebar > .panel.details.css-style > .content > .computed .property .go-to-arrow): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .property:not(:hover) .go-to-arrow): Deleted.
Change hover area to include white space on the side of computed variables.

* UserInterface/Views/ComputedStyleSection.css:
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property .go-to-arrow):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property > .content > .contextual-documentation-button):
(.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property > .content > .contextual-documentation-button):
Add unifrom styling for go-to-arrow button and contextual-documentation-button for computed properties.

* UserInterface/Views/ContextualDocumentationPopover.css: Added.
(.popover .documentation-popover-content):
(.popover .documentation-popover-content > p):
(.popover .documentation-popover-content > .name-header):
(.popover .documentation-popover-content > .syntax):
(.popover .documentation-popover-content > .syntax > .syntax-title):
(.popover .documentation-popover-content > .reference-link):
* UserInterface/Views/ContextualDocumentationPopover.js: Added.
(WI.ContextualDocumentationPopover):
(WI.ContextualDocumentationPopover.prototype.show):
(WI.ContextualDocumentationPopover.prototype._presentOverTargetElement):
(WI.ContextualDocumentationPopover.prototype._getDocumentationDetails):
(WI.ContextualDocumentationPopover.prototype._createDocumentationElement):
Add new class that extends Popover.js and  handles fetching the values from VS Code documentation, puts relevant
information in the popover and presents the popover when the documentation-button is clicked.

* UserInterface/Views/Main.css:
(.contextual-documentation-button):
(.contextual-documentation-button:active):
(@media (prefers-color-scheme: dark) .contextual-documentation-button):
Add general styling for contextualDocumentationButton.

* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createElementsSettingsView):
Add a new setting in Elements Tab to show syntax.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.willDismissPopover):
Add a method - willDismissPopover to handle changes when the documentation popover is about to dismiss.
(WI.SpreadsheetStyleProperty.prototype.update):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
(WI.SpreadsheetStyleProperty.prototype._addContextualDocumentationButton):
Add a method which gets called for all property fields and also gets called when property name is changed and
updated by clicking out of the property name field or tabbing into the next value field and is responsible for
adding the info button add the end of the property.
(WI.SpreadsheetStyleProperty.prototype._handleContextualDocumentationButtonClicked):
(WI.SpreadsheetStyleProperty.prototype._presentContextualDocumentation):
Add a method which creates an instance of the ContextualDocumentationPopover.js class and shows it.

Canonical link: https://commits.webkit.org/239362@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-02 19:19:47 +00:00
..
ActiveCallFrame.svg
Appearance.svg
ApplicationCacheManifest.svg Updated breakpoint and search type icons 2020-03-03 03:03:47 +00:00
ArrowUp.svg
Audit.svg
AuditStart.svg
AuditStop.svg
AuditTestError.svg
AuditTestFail.svg
AuditTestNoResult.svg
AuditTestPass.svg
AuditTestUnsupported.svg
AuditTestWarn.svg
BackForwardArrows.svg
Beacon.svg Update resource, type, and instrument icons for light, dark, and override colors 2020-02-17 22:40:11 +00:00
BoxShadow.svg Web Inspector: CSS: create visual editor for `box-shadow` 2020-03-29 02:56:05 +00:00
Breakpoint.svg
BreakpointButton.svg
BreakpointInactiveButton.svg
Breakpoints.svg
CSSVariable.svg
CallStack.svg
Camera.svg
Canvas2D.svg
Canvas3D.svg
CanvasOverview.svg
Checkers.svg
Circle.svg
Clip.svg
ClippingIcons.svg Updated breakpoint and search type icons 2020-03-03 03:03:47 +00:00
Close.svg
CloseLarge.svg
CloseWhite.svg
ColorIcon.png
ColorIcon@2x.png
Compare.svg
Composite.svg
Console.svg
ConsoleImage.svg
Cookie.svg Update resource, type, and instrument icons for light, dark, and override colors 2020-02-17 22:40:11 +00:00
Crosshair.svg
CubicBezier.svg
DOMBreakpoint.svg
Database.svg Update resource, type, and instrument icons for light, dark, and override colors 2020-02-17 22:40:11 +00:00
Debug.svg
Debugger.svg
Device.svg
DisclosureTriangles.svg
DockBottom.svg
DockLeft.svg
DockRight.svg
DocumentIcons.svg Web Inspector: add UI for request interception 2020-12-09 22:33:47 +00:00
DownloadArrow.svg
Elements.svg
Error.svg
Errors.svg
ErrorsEnabled.svg
EventCancel.svg
EventIteration.svg
EventPause.svg
EventPlay.svg
EventProcessing.svg
EventStop.svg
Export.svg
Fill.svg
FilterFieldGlyph.svg
FolderGeneric.svg Updated breakpoint and search type icons 2020-03-03 03:03:47 +00:00
Gear.svg
GoToArrow.svg
GradientStop.png
GradientStop@2x.png
GradientStopSelected.png
GradientStopSelected@2x.png
Graphics.svg Web Inspector: add instrumentation for showing existing Web Animations 2020-01-29 23:46:15 +00:00
Hide.svg
HideConsoleDrawer.svg
HierarchicalNavigationItemChevron.svg
HoverMenuButton.png
HoverMenuButton@2x.png
IdentifierIcons.svg Fixed missing icons for WI.ThreadTreeElement and selected Heap Snapshots 2020-03-07 01:18:44 +00:00
IgnoreCaches.svg
Image.svg
Import.svg
IndeterminateProgressSpinner1.svg
IndeterminateProgressSpinner2.svg
IndeterminateProgressSpinner3.svg
IndeterminateProgressSpinner4.svg
IndeterminateProgressSpinner5.svg
IndeterminateProgressSpinner6.svg
IndeterminateProgressSpinner7.svg
IndeterminateProgressSpinner8.svg
IndeterminateProgressSpinner9.svg
IndeterminateProgressSpinner10.svg
IndeterminateProgressSpinner11.svg
IndeterminateProgressSpinner12.svg
Info.svg
InfoIcon.svg Web Inspector: add contextual documentation for CSS properties 2021-07-02 19:19:47 +00:00
InstructionPointer.png
InstructionPointer@2x.png
Issues.svg
IssuesEnabled.svg
LayerBorders.svg
Layers.svg
LineStyle.svg
Locked.svg
Log.svg
Logs.svg
Markup.svg
Minus.svg
NavigationItemCheckers.svg
NavigationItemCodeCoverage.svg
NavigationItemCurleyBraces.svg
NavigationItemGarbageCollect.svg
NavigationItemNetworkOverride.svg Update the resource override button icon 2020-03-03 02:33:23 +00:00
NavigationItemTrash.svg
NavigationItemTypes.svg
Network.svg
NetworkHAR.svg
NetworkOverview.svg
Origin.svg Updated breakpoint and search type icons 2020-03-03 03:03:47 +00:00
Paint.svg
Palette.svg
Path.svg
PathArc.svg
PathCurve.svg
PathEllipse.svg
PathLineTo.svg
PathMoveTo.svg
PathRect.svg
Pause.svg
Pencil.svg
Pixels.svg
Plus13.svg
Plus15.svg
PointInPath.svg
PointInStroke.svg
Printer.svg
Receiving.svg
Record.svg
Recording.svg
ReloadFull.svg
ReloadToolbar.svg
Resources.svg
ResultLine.svg
Resume.svg
Rulers.svg
Search.svg
Sending.svg
Shadow.svg
Show.svg
ShowConsoleDrawer.svg
SliderThumb.png
SliderThumb@2x.png
SliderThumbPressed.png
SliderThumbPressed@2x.png
SortIndicatorArrows.svg
Sources.svg
SourcesPaused.svg Web Inspector: Items in the toolbar take up to much vertical space 2020-03-03 03:22:01 +00:00
SplitToggleUp.svg
StepInto.svg
StepNext.svg Web Inspector: Debugger: add a Step next that steps by expression 2020-04-15 02:35:04 +00:00
StepOut.svg
StepOver.svg
Stop.svg
Stopwatch.svg Update resource, type, and instrument icons for light, dark, and override colors 2020-02-17 22:40:11 +00:00
Storage.svg
Stroke.svg
StyleRule.svg
StyleRulePseudo.svg
TabPicker.svg
TableIcons.svg Updated breakpoint and search type icons 2020-03-03 03:03:47 +00:00
Text.svg
Time.svg
Timeline.svg
ToggleLeftSidebar.svg
ToggleRightSidebar.svg
Transform.svg
TypeIcons.svg Web Inspector: Collapse blackboxed call frames in Sources 2021-02-04 17:16:03 +00:00
Undock.svg
UpDownArrows.svg
UserInputPrompt.svg
UserInputPromptPrevious.svg
UserInputResult.svg
Warning.svg
Weight.svg
ZoomIn.svg Web Inspector: add support for panning/zooming on images 2021-05-10 18:43:47 +00:00
ZoomOut.svg Web Inspector: add support for panning/zooming on images 2021-05-10 18:43:47 +00:00