merefield  
                (Robert)
               
                 
              
                  
                    December 10, 2023,  9:59pm
                   
                   
              1 
               
             
            
              I’m working on COMPATIBILITY: move thumbnail selector to Glimmer & new Component modal system by merefield · Pull Request #32 · paviliondev/discourse-tc-topic-list-previews · GitHub 
I was using bufferedProperty on a Modal Controller, but I’ve now been forced to move to a Component to support the new Component modal architecture .
However, I believe still need to use bufferedProperty (I’m updating a value in the Topic Meta).
This however, raises an error:
export default class AwesomeModalComponent extends Component.extend(
  bufferedProperty("model")
) {
 
… and I get TypeError: n.default.extend is not a function
I have found some examples of this pattern, but only for Controllers:
Be good to know what the plan is here on the “TODO”
             
            
               
               
              3 Likes 
            
            
           
          
            
              
                david  
                (David Taylor)
               
              
                  
                    December 11, 2023,  9:57am
                   
                   
              2 
               
             
            
              The easiest short-term answer is: continue using a Classic Component for your modal (i.e. not a glimmer component). Classic Components still support mixins.
Sticking to a classic component (i.e. the strategy described in Converting modals from legacy controllers to new DModal component API ) will give you the cleanest 1:1 upgrade from the old controller-based system.
Longer-term, we will need to figure out alternatives to some of our core mixins. But we haven’t quite got there yet.
             
            
               
               
              4 Likes 
            
            
           
          
            
              
                merefield  
                (Robert)
               
              
                  
                    December 14, 2023, 10:20am
                   
                   
              3 
               
             
            
              Just to follow up and say thanks.  I used this exact approach and got everything working  - I moved everything to Glimmer bar the modal itself which needed the Mixin.
btw, bufferedProperty seems to perform a lot of magic and doesn’t seem to follow any of the standard rules related to passing of changes!
             
            
               
               
              1 Like 
            
            
           
          
            
              
                system  
                (system)
                  Closed 
               
              
                  
                    January 13, 2024, 10:21am
                   
                   
              4 
               
             
            
              This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.