Skip to content

investigate dart fix renames for this package #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devoncarew opened this issue Jan 12, 2024 · 7 comments
Closed

investigate dart fix renames for this package #139

devoncarew opened this issue Jan 12, 2024 · 7 comments

Comments

@devoncarew
Copy link
Member

devoncarew commented Jan 12, 2024

We should investigate using dart fix to rename from older dart:html class names to the newer package:web ones. At a first pass, here are the renames (this does not include symbols from dart:svg, ...).

This table has all the changed symbols on the left - or symbols with no match in package:web - and all the matching symbols on the right. It doesn't include the ~300-400 that didn't change.

dart:html package:web
AbortPaymentEvent
AccessibleNode
AccessibleNodeList
AnchorElement HTMLAnchorElement
AnimationEffectReadOnly
AnimationEffectTiming
AnimationEffectTimingReadOnly
ApplicationCache
ApplicationCacheErrorEvent
AreaElement HTMLAreaElement
AudioElement HTMLAudioElement
BackgroundFetchClickEvent
BackgroundFetchedEvent
BackgroundFetchFailEvent
BackgroundFetchFetch
BackgroundFetchSettledFetch
BaseElement HTMLBaseElement
BluetoothRemoteGattDescriptor BluetoothRemoteGATTDescriptor
BodyElement HTMLBodyElement
BRElement HTMLBRElement
BudgetState
ButtonElement HTMLButtonElement
CanvasElement HTMLCanvasElement
CDataSection CDATASection
ContentElement
Coordinates
Css CSS
CssCharsetRule
CssConditionRule CSSConditionRule
CssFontFaceRule CSSFontFaceRule
CssGroupingRule CSSGroupingRule
CssImageValue CSSImageValue
CssImportRule CSSImportRule
CssKeyframeRule CSSKeyframeRule
CssKeyframesRule CSSKeyframesRule
CssKeywordValue CSSKeywordValue
CssMatrixComponent CSSMatrixComponent
CssMediaRule CSSMediaRule
CssNamespaceRule CSSNamespaceRule
CssNumericValue CSSNumericValue
CssPageRule CSSPageRule
CssPerspective CSSPerspective
CssPositionValue
CssResourceValue
CssRotation
CssRule CSSRule
CssScale CSSScale
CssSkew CSSSkew
CssStyleDeclaration CSSStyleDeclaration
CssStyleRule CSSStyleRule
CssStyleSheet CSSStyleSheet
CssStyleValue CSSStyleValue
CssSupportsRule CSSSupportsRule
CssTransformComponent CSSTransformComponent
CssTransformValue CSSTransformValue
CssTranslation
CssUnitValue CSSUnitValue
CssUnparsedValue CSSUnparsedValue
CssurlImageValue
CssVariableReferenceValue CSSVariableReferenceValue
CssViewportRule
DataElement HTMLDataElement
DataListElement HTMLDataListElement
DeprecatedStorageInfo
DeprecatedStorageQuota
DeprecationReport
DetailsElement HTMLDetailsElement
DeviceAcceleration
DeviceRotationRate
DialogElement HTMLDialogElement
DivElement HTMLDivElement
DListElement HTMLDListElement
DomError
DomException DOMException
DomImplementation DOMImplementation
DomIterator
DomMatrix DOMMatrix
DomMatrixReadOnly DOMMatrixReadOnly
DomParser DOMParser
DomPoint DOMPoint
DomPointReadOnly DOMPointReadOnly
DomQuad DOMQuad
DomRectList DOMRectList
DomRectReadOnly DOMRectReadOnly
DomStringList DOMStringList
DomStringMap DOMStringMap
DomTokenList DOMTokenList
EmbedElement HTMLEmbedElement
Entry
FieldSetElement HTMLFieldSetElement
FileEntry
FileWriter
ForeignFetchEvent
FormElement HTMLFormElement
Geoposition
HeadElement HTMLHeadElement
HeadingElement HTMLHeadingElement
HRElement HTMLHRElement
HtmlCollection HTMLCollection
HtmlDocument Document
HtmlElement HTMLElement
HtmlFormControlsCollection HTMLFormControlsCollection
HtmlHtmlElement HTMLHtmlElement
HtmlHyperlinkElementUtils HTMLHyperlinkElementUtils
HtmlOptionsCollection HTMLOptionsCollection
HttpRequest XMLHttpRequest
HttpRequestEventTarget XMLHttpRequestEventTarget
HttpRequestUpload XMLHttpRequestUpload
IFrameElement HTMLIFrameElement
ImageElement HTMLImageElement
InputElement HTMLInputElement
InstallEvent
InterventionReport
KeyframeEffectReadOnly
LabelElement HTMLLabelElement
LegendElement HTMLLegendElement
LIElement HTMLLIElement
LinkElement HTMLLinkElement
MapElement HTMLMapElement
MediaElement HTMLMediaElement
MediaKeysPolicy
MediaStreamEvent
MemoryInfo
MenuElement HTMLMenuElement
Metadata
MetaElement HTMLMetaElement
MeterElement HTMLMeterElement
MidiAccess MIDIAccess
MidiConnectionEvent MIDIConnectionEvent
MidiInput MIDIInput
MidiInputMap MIDIInputMap
MidiMessageEvent MIDIMessageEvent
MidiOutput MIDIOutput
MidiOutputMap MIDIOutputMap
MidiPort MIDIPort
ModElement HTMLModElement
NavigatorUserMediaError
NoncedElement
ObjectElement HTMLObjectElement
OListElement HTMLOListElement
OptGroupElement HTMLOptGroupElement
OptionElement HTMLOptionElement
OutputElement HTMLOutputElement
ParagraphElement HTMLParagraphElement
ParamElement HTMLParamElement
PaymentAddress
PaymentInstruments
PictureElement HTMLPictureElement
PositionError
PreElement HTMLPreElement
ProgressElement HTMLProgressElement
QuoteElement HTMLQuoteElement
RtcCertificate RTCCertificate
RtcDataChannel RTCDataChannel
RtcDataChannelEvent RTCDataChannelEvent
RtcDtmfSender RTCDTMFSender
RtcDtmfToneChangeEvent RTCDTMFToneChangeEvent
RtcIceCandidate RTCIceCandidate
RtcLegacyStatsReport
RtcPeerConnection RTCPeerConnection
RtcPeerConnectionIceEvent RTCPeerConnectionIceEvent
RtcRtpContributingSource RTCRtpContributingSource
RtcRtpReceiver RTCRtpReceiver
RtcRtpSender RTCRtpSender
RtcSessionDescription RTCSessionDescription
RtcStatsReport RTCStatsReport
RtcStatsResponse
RtcTrackEvent RTCTrackEvent
ScriptElement HTMLScriptElement
ScrollState
SelectElement HTMLSelectElement
ShadowElement
SharedArrayBuffer
SlotElement HTMLSlotElement
SourceElement HTMLSourceElement
SpanElement HTMLSpanElement
SpeechRecognitionError
StyleElement HTMLStyleElement
StyleMedia
StylePropertyMapReadonly StylePropertyMapReadOnly
TableCaptionElement HTMLTableCaptionElement
TableColElement HTMLTableColElement
TableElement HTMLTableElement
TableRowElement HTMLTableRowElement
TableSectionElement HTMLTableSectionElement
TemplateElement HTMLTemplateElement
TextAreaElement HTMLTextAreaElement
TextEvent
TimeElement HTMLTimeElement
TitleElement HTMLTitleElement
TrackDefault
TrackDefaultList
TrackElement HTMLTrackElement
TrustedHtml TrustedHTML
TrustedScriptUrl TrustedScriptURL
TrustedUrl
UListElement HTMLUListElement
UnderlyingSourceBase
UnknownElement HTMLUnknownElement
Url URL
UrlSearchParams URLSearchParams
VideoElement HTMLVideoElement
VR
VRCoordinateSystem
VRDevice
VRDeviceEvent
VRDisplay
VRDisplayCapabilities
VRDisplayEvent
VREyeParameters
VRFrameData
VRFrameOfReference
VRPose
VRSession
VRSessionEvent
VRStageBounds
VRStageBoundsPoint
VRStageParameters
VttCue VTTCue
VttRegion VTTRegion
WorkerPerformance
XmlDocument XMLDocument
XmlSerializer XMLSerializer
XsltProcessor XSLTProcessor
@devoncarew
Copy link
Member Author

cc @MaryaBelanger, who asked about which class names had changed between packages

@MaryaBelanger
Copy link
Contributor

Thanks Devon, this will be a big help until your dart fix gets added.

For my understanding, what's the context behind symbols on the left that have no match in package:web? Like, if someone is using Entry or something in their existing code, and they want to migrate their code, what do they do now? E.g.,

  • Do they just have to kind of refactor their code to not rely on that?
  • Or do they look through the new package:web classes to find something that isn't an exact translation but accomplishes something similar?
  • Or is it that all of the symbols that don't have package:web equivalents are symbols that no one was using anyway?

@devoncarew
Copy link
Member Author

devoncarew commented Jan 12, 2024

Excellent questions! I believe the ones w/ no mappings may no longer exist in the new world? Or my script may not have found the correct mapping. What they should do will probably be specific to each symbol. I suspect that the ones that don't have mappings aren't ones that are commonly used however - they'll be on the long tail of usages.

@srujzs and @sigmundch may be able to provide better advice however.

@devoncarew
Copy link
Member Author

When #141 lands it will contribute a markdown file w/ the mappings, which should be a good system-of-record for any manual updates we need to make to the mappings.

@srujzs
Copy link
Contributor

srujzs commented Jan 12, 2024

I think the script might be missing some of these. The @Native annotation on a dart:html class can contain multiple interfaces separated by a comma. For example, FileEntry has: FileEntry,webkitFileSystemFileEntry,FileSystemFileEntry. The right package:web equivalent is therefore FileSystemFileEntry.

That being said, I'm sure there are classes that we expose but whose @Native equivalent just doesn't exist anymore due to the staleness of dart:html.

@devoncarew
Copy link
Member Author

Thanks! I was able to find 1/2 dozen more renames by taking another pass through the dart:html source:

4c1aab0#diff-66b081f16cd4aea3b83a1c00aba3e3b4589d8ace8f501be6afecdf2c8481c1d4

I think most of the remaining items are just no longer in the DOM, but we can always update the table w/ new info.

@devoncarew
Copy link
Member Author

landed in #141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants