Comments (7)
@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
- How are you planning to implement this? The Complex Commands API? Might it be worthwhile to use vscode-css as a basis?
from salesforcedx-vscode.
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.
@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.
@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.
@ayeshakmaz I don't seem to have access to the link. Could you add me to the repo?
from salesforcedx-vscode.
@vazexqi Sorry about that, added you
from salesforcedx-vscode.
Closed via #101.
from salesforcedx-vscode.
Related Issues (20)
- Not getting Autocomplete of Aura Component HOT 12
- Sandbox authentication from vs code HOT 6
- Important Update: Changes to our deprecation plans
- Retrieve source results are two times bigger because of "xml" shifted to next line (see picture inside) HOT 5
- When using Rename Symbol (F2) with variable that contains number "sumOfLast3Months" only "Months" is shown in rename field. HOT 3
- `sf apex get test` throws heap out of memory HOT 6
- Error when installing plugin -- @oclif/[email protected]: Package no longer supported. HOT 5
- VF Language Server - textDocument/documentHighlight failed HOT 8
- Error: The string "" is not a valid JSON string HOT 2
- Org Browser - Incorrectly loading standard salesforce Custom Applications HOT 2
- Missing output of "Apex Code Coverage by Class" when "Store Only Aggregated Code Coverage" is enabled in the Test Execution settings HOT 7
- Internal error wit Replay Debugger HOT 3
- `<style>` tag breaks VF Language Server HOT 1
- Debug test(s) failed to run HOT 6
- Unable to Update CustomField Metadata. SFDX: Deploy Providing False Success Message HOT 1
- Unable to Update CustomField Metadata. SFDX: Deploy Providing False Success Message HOT 6
- Using Rename Symbol (F2) in VSCode renames also part after dot. HOT 2
- 📢 📢 Einstein for Developers enters the Salesforce Extension Pack (Expanded) with release 60.15.0 of the Expanded Pack HOT 3
- unable to connect org HOT 2
- Run Query Option Above SOQL Queries with Results in SOQL Builder Table View HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from salesforcedx-vscode.