[Webkit-unassigned] [Bug 273721] New: Web Inspector: getCompletionText should belong to a more generic class than CSSCompletions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 3 17:34:07 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=273721

            Bug ID: 273721
           Summary: Web Inspector: getCompletionText should belong to a
                    more generic class than CSSCompletions
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Minor
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: qianlangchen at apple.com
                CC: inspector-bugzilla-changes at group.apple.com

In the inspector's frontend code, there's a convenience function WI.CSSCompletions.getCompletionText to retrieve the display text of a `completion` variable that is either a String or a WI.QueryResult. Now, WI.QueryResult by its name implies that it can be used to filter code completion suggestions for any language, not just CSS. Therefore, the callers of WI.CSSCompletions.getCompletionText may not necessarily be dealing with suggestions specifically for CSS, and the function should probably be served by a class with a more generic name such as WI.Completions.

See discussion [here](https://github.com/WebKit/WebKit/pull/26137/commits/c37407ab48a1ced442643f6a51bba738ce488cd6#diff-26a23acb61e6e02c7ca21f91c07aa423a41edae8d5c518329bd66259585af410), where in the PR CodeMirrorCompletionController tries to use WI.CSSCompletions.getCompletionText while not always suggesting CSS code, hinting at a possible need for this slight refactoring.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240504/ab4265ae/attachment.htm>


More information about the webkit-unassigned mailing list