- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.3k
 
Core: move devicePixelRatio to dedicated library #13924
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
base: master
Are you sure you want to change the base?
Core: move devicePixelRatio to dedicated library #13924
Conversation
| 
           Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR: 
 Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀  | 
    
| 
           Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR: 
 Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀  | 
    
        
          
                modules/apstreamBidAdapter.js
              
                Outdated
          
        
      | const winDimensions = getWinDimensions(); | ||
| const width = winDimensions.screen?.width ?? window.screen?.width; | ||
| const height = winDimensions.screen?.height ?? window.screen?.height; | ||
| const devicePixelRatio = getDevicePixelRatio() ?? window.devicePixelRatio; | 
Check warning
Code scanning / CodeQL
Access to window.devicePixelRatio
        
          
                modules/hypelabBidAdapter.js
              
                Outdated
          
        
      | const uuid = uids[0] ? uids[0] : generateTemporaryUUID(); | ||
| const floor = getBidFloor(request, request.sizes || []); | ||
| const dpr = typeof window !== 'undefined' ? window.devicePixelRatio : 1; | ||
| const dpr = getDevicePixelRatio() ?? (typeof window !== 'undefined' ? window.devicePixelRatio : 1); | 
Check warning
Code scanning / CodeQL
Access to window.devicePixelRatio
| 
           Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR: 
 Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀  | 
    
| 
           Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR: 
 Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀  | 
    
| 
           still discussing approximating this  | 
    
| 
           Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR: 
 Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀  | 
    
| 
           Tread carefully! This PR adds 2 linter errors (possibly disabled through directives): 
  | 
    
related to #12060