Giter VIP home page Giter VIP logo

Comments (7)

vazexqi avatar vazexqi commented on June 19, 2024

@ayeshakmaz - Couple of quick questions:

Functionality

  • Since you are not just detecting deprecated but also offering to fix it, what happens for external customers who are using SLDS through a static resource? Per my understanding, they need to pick a particular version of it. What if they are still on the older version of it. If your tool were to make suggestions, it would break since they don't have the new CSS as as static resource yet?
  • What files will you scan? Dedicated .css files or also inline CSS?

Implementation

from salesforcedx-vscode.

ayeshakmaz avatar ayeshakmaz commented on June 19, 2024

@vazexqi

Functionality:

  • Ideally, if we detect that an older version of the static SLDS is being used, we won't run the extension. The tooltip will also only suggest the new class name and mention what minimum release it applies to.
  • We're actually scanning the .html/.cmp files, not CSS (css scanning will be coming later). We first want to detect if they're using the correct html markup/class names

Implementation:

  • I'm planning to implement this as a language server, similar to this tutorial, unless you have a better suggestion. The vscode-css will be super useful for the next piece of the extension

from salesforcedx-vscode.

vazexqi avatar vazexqi commented on June 19, 2024

@ayeshakmaz - Thanks for the clarification. I am assuming that this is your first time writing a language server for VS Code? In that case, the tutorial you have chosen is a good way to start. Let's go with that route and when you have something that runs, ping me and I will take a closer look. The learning experience will be useful.

Eventually, we would need to hook this into the existing HTML server. Scaning a HTML page is going to be more tricky (not undoable, but will be more tricky) since HTML pages have several regions of different languages: HTML, JavaScript and CSS. So, when we eventually hook into the HTML page, we would need to make sure that your CSS scanner only runs in the CSS regions.

Taking a look at how an extension has done this for Vue might be useful. See Vuetur, in particular the presentation.

from salesforcedx-vscode.

ayeshakmaz avatar ayeshakmaz commented on June 19, 2024

@vazexqi I've created a prototype with that tutorial that you can see here Very simple, only works on .html or .txt files

I hooked up a basic console.log extension into the current Lightning package in this repo and got it running when you open any of the aliased HTML pages. We can worry about the CSS later, but it might be helpful to pair briefly to get a quick intro into how the current HTML server hooks into the rest of the extension. I was planning to copy the vscode-apex language server as a template and go from there. Does that seem like a good approach?

from salesforcedx-vscode.

vazexqi avatar vazexqi commented on June 19, 2024

@ayeshakmaz I don't seem to have access to the link. Could you add me to the repo?

from salesforcedx-vscode.

ayeshakmaz avatar ayeshakmaz commented on June 19, 2024

@vazexqi Sorry about that, added you

from salesforcedx-vscode.

vazexqi avatar vazexqi commented on June 19, 2024

Closed via #101.

from salesforcedx-vscode.

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.