The Device class is basically copied from openui5 at the beginning of this project and has lots of coding which isn't actually used. Our library should only contain coding we or our users need:
Media
The Media file is supporting various rangesets, but the SAP Standard Extended is the only one used.
[x] remove other rangesets
[x] don't apply classes to the html tag
[x] don't export initRangeSet and removeRangeSet API (only used internally and for tests)
[x] keep attachMediaHandler and detachMediaHandler --> used in useViewportRange
--> supportRetina is the only check that is not always returning true in our supported browsers but it is never used internally. Should be move up that API to the Device or delete the Support file entirely?
Utils
[x] getWindowSize
[x] changeRootCssClass - remove as not longer relevant
[x] getQuery
[x] convertToPx
[x] matchLegacyBySize - remove. All browser support modern matchMedia
[x] isLandscape
Device
[x] getWindowSize only used in Device
[ ] attachResizeHandler never used internally
[ ] detachResizeHandler never used internally
[ ] getOrientation never used internally
[ ] attachOrientationChangeHandler never used internally
[ ] detachOrientationChangeHandler never used internally
The
Device
class is basically copied from openui5 at the beginning of this project and has lots of coding which isn't actually used. Our library should only contain coding we or our users need:Media
The Media file is supporting various rangesets, but the SAP Standard Extended is the only one used.
html
taginitRangeSet
andremoveRangeSet
API (only used internally and for tests)attachMediaHandler
anddetachMediaHandler
--> used inuseViewportRange
Support
supportPointerEvents
https://caniuse.com/?search=pointer%20eventssupportInputPlaceholder
https://caniuse.com/?search=input%20placeholder https://caniuse.com/?search=text%20area%20placeholdersupportWebSocket
https://caniuse.com/?search=web%20socketsupportMatchMedia
https://caniuse.com/?search=matchMediasupportMatchMediaListener
supported in all browsers except IE11 https://caniuse.com/mdn-api_mediaquerylistevent_matchessupportOrientation
supported in all browsers except IE11 https://caniuse.com/mdn-api_window_deviceorientation_event-->
supportRetina
is the only check that is not always returning true in our supported browsers but it is never used internally. Should be move up that API to theDevice
or delete theSupport
file entirely?Utils
getWindowSize
changeRootCssClass
- remove as not longer relevantgetQuery
convertToPx
matchLegacyBySize
- remove. All browser support modern matchMediaisLandscape
Device
getWindowSize
only used in DeviceattachResizeHandler
never used internallydetachResizeHandler
never used internallygetOrientation
never used internallyattachOrientationChangeHandler
never used internallydetachOrientationChangeHandler
never used internally