Coder Social home page Coder Social logo

Comments (6)

OEvgeny avatar OEvgeny commented on June 27, 2024 2

While I understand the frustration, I have to point out that we do not support or promote undocumented APIs usage. The issue is the only issue mentioning this particular function.

Keeping our documentation clean and concise, and all publicly available APIs mentioned is one of our goals. If you don't see a function mentioned in our docs, this most likely means it is not a part of our public API. Feel free to open an issue if you see any particular problems with our documentation.

To address some use-cases we have a plan to expose a small set of internal APIs under botframework-*/internal, but we haven't discussed downscaleImageToDataURL utility function in particular. That said if you have use-cases, feel free to share so we could decide with your particular case in mind. The internal APIs available this way are still not recommended for usage though.

from botframework-webchat.

compulim avatar compulim commented on June 27, 2024 2

@ericrrichards I understood your frustration on ^4.14.0 resolves to 4.17.0.

To be honest, I would love to follow semantic versioning precisely and update the major version when we introduce new features or breaking changes. But unfortunately, I don't have control over the first digit of the version number.

I will document it in README.md. In the meanwhile, could you use ~4.14.0? This will move you up the 4.14.* but not 4.*.

Appreciated.

p.s. I will give feedback to our orgs about semantic versioning.

from botframework-webchat.

SamuelTassell avatar SamuelTassell commented on June 27, 2024 2

+1 for the internal functions being clearly separated, I'm assuming many head to the source instead of the hooks, depending on use case, potentially a case for an additional test. We were importing an internal function directly, thus including the exports in the package.json was a breaking change for us and a bit of a (admittedly self inflicted) time sink. Not using the available hook wouldn't haven't created this issue but as this is old code that has been in place as this project has matured, refactoring was overlooked for speed. Not a criticism, just my 2 cents.

from botframework-webchat.

OEvgeny avatar OEvgeny commented on June 27, 2024 1

The downscaleImageToDataURLUsingBrowser function was never meant to be directly used or to be a part of public WebChat API.

In the latest release, we added exports field to our package.json as we now support both ESM and CJS, and have to provide a way for runtimes and bundlers to distinguish between them. As a side-effect it protects our internal APIs from being directly imported.

Depending on the use-case you may be able to use useMakeThumbnail instead, which is publically available react hook.

If you have a use-case in mind which requires direct usage of the downscaleImageToDataURLUsingBrowser, let's discuss in this issue. We're happy to take this as an opportunity to improve our public APIs.

from botframework-webchat.

ericrrichards avatar ericrrichards commented on June 27, 2024

Understandable, it's just frustrating because it was a breaking change for us and I wasted most of a day figuring out what the problem even was.

  • NPM pakage.json dependency syntax is horrible by default, and "^4.14.0" will happily resolve to 4.17.0 instead of the real desired package version.
  • There is very little good documentation on what the public API surface of the botframework-webchat API is. Somebody on my team found this usage suggested at some point - we've been using this for a number of years and probably make up a healthy of chunk of the weekly downloads on the NPM stats via our Azure Devops build agents.

from botframework-webchat.

ericrrichards avatar ericrrichards commented on June 27, 2024

I appreciate the responses - I would agree that this has been a mostly self-inflicted bit of pain because we were doing something we were never supposed to be doing. We'll update eventually to use the hook or write our own code for that, but for now we're sticking at 4.16.0 until we have space to deal with it properly.

I've got a good deal of frustration at the moment with anything Teams-related, because there are a lot of moving parts right now.
I assume because they are shifting to the new Teams client while it isn't really ready yet. Every week for the last couple months I've been dealing with something in the Bot Framework back-end services that was stable for 4-5 years that has had some new breaking change deployed. Today, it's that my bot can no longer download images that a user has copy/pasted into the desktop Teams client using the smba.trafficmanager.net URL that is provided in the file attachment object I receive in the message activity. Something that has worked for five years is broken and I've got to scramble to build a patch and get the ball rolling to deploy that to a bunch of on-premise F500 customers.

from botframework-webchat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.