What on Earth is the `types` Descriptor in View Transitions? - Related to what, db, `types`, comments, how
What on Earth is the `types` Descriptor in View Transitions?

Have you ever stumbled upon something new and went to research it just to find that there is little-to-no information about it? It’s a mixed feeling: confusing and discouraging because there is no apparent direction, but also exciting because it’s probably new to lots of people, not just you. Something like that happened to me while writing an Almanac’s entry for the @view-transition at-rule and its types descriptor.
You may already know about Cross-Document View Transitions: With a few lines of CSS, they allow for transitions between two pages, something that in the past required a single-app framework with a side of animation library. In other words, lots of JavaScript.
To start a transition between two pages, we have to set the @view-transition at-rule’s navigation descriptor to auto on both pages, and that gives us a smooth cross-fade transition between the two pages. So, as the old page fades out, the new page fades in.
That’s it! And navigation is the only descriptor we need. In fact, it’s the only descriptor available for the @view-transition at-rule, right? Well, turns out there is another descriptor, a lesser-known brother, and one that probably envies how much attention navigation gets: the types descriptor.
Cross-Documents View Transitions are still fresh from the oven, so it’s normal that people haven’t fully dissected every aspect of them, especially since they introduce a lot of new stuff: a new at-rule, a couple of new properties and tons of pseudo-elements and pseudo-classes. However, it still surprises me the little mention of types . Some documentation fails to even name it among the valid @view-transition descriptors. Luckily, though, the CSS specification does offer a little clarification about it:
The types descriptor sets the active types for the transition when capturing or performing the transition.
To be more precise, types can take a space-separated list with the names of the active types (as ), or none if there aren’t valid active types for that page.
So the following values would work inside types :
@view-transition { navigation: auto; types: bounce; } /* or a list */ @view-transition { navigation: auto; types: bounce fade rotate; }.
Yes, but what exactly are “active” types? That word “active” seems to be doing a lot of heavy lifting in the CSS specification’s definition and I want to unpack that to improved understand what it means.
The solution: Active types define which transition gets used and which elements should be included in it. In CSS, they are used through :active-view-transition-type() , a pseudo-class that matches an element if it has a specific active type. Going back to our last example, we defined the document’s active type as bounce . We could enclose that bounce animation behind an :active-view-transition-type(bounce) , such that it only triggers on that page.
/* This one will be used! */ html:active-view-transition-type(bounce) { &::view-transition-old(page) { /* Custom Animation */ } &::view-transition-new(page) { /* Custom Animation */ } }.
This prevents other view transitions from running if they don’t match any active type:
/* This one won't be used! */ html:active-view-transition-type(slide) { &::view-transition-old(page) { /* Custom Animation */ } &::view-transition-new(page) { /* Custom Animation */ } }.
I asked myself whether this triggers the transition when going to the page, when out of the page, or in both instances. Turns out it only limits the transition when going to the page, so the last bounce animation is only triggered when navigating toward a page with a bounce value on its types descriptor, but not when leaving that page. This allows for custom transitions depending on which page we are going to.
The following demo has two pages that share a stylesheet with the bounce and slide view transitions, both respectively enclosed behind an :active-view-transition-type(bounce) and :active-view-transition-type(slide) like the last example. We can control which page uses which view transition through the types descriptor.
The first page uses the bounce animation:
@view-transition { navigation: auto; types: bounce; }.
The second page uses the slide animation:
@view-transition { navigation: auto; types: slide; }.
You can visit the demo here and see the full code over at GitHub.
The types descriptor is used more in JavaScript.
The main problem is that we can only control the transition depending on the page we’re navigating to, which puts a major cap on how much we can customize our transitions. For instance, the pagination and social media examples we looked at aren’t possible just using CSS, since we need to know where the user is coming from. Luckily, using the types descriptor is just one of three ways that active types can be populated. Per spec, they can be:
Passed as part of the arguments to startViewTransition(callbackOptions) Mutated at any time, using the transition’s types Declared for a cross-document view transition, using the types descriptor.
I must admit, I am not the most experienced guy to talk about this option, so once I demo the heck out of different transitions with active types I’ll come back with my findings! In the meantime, I encourage you to read about active types here if you are like me and want more on view transitions:
Svelte 5 And The Future Of Frameworks: A Chat With Rich Harris.
After months of anticipation, debate, and even......
In my previous posts, we explored how LangChain simplifies AI application development and how to deploy Gemini-powered LangChain applications on GKE. ......
A little gem from Kevin Powell’s “HTML & of the Week” website, reminding us that using container queries opens up container query units for si......
How to Add Comments in Terraform Code

In Terraform, comments are lines or sections of code that are ignored during execution but are useful for providing context, explanations, or notes within the code. They ensure team members can quickly grasp the purpose and functionality of configurations, reducing confusion and improving efficiency.
In this article, we’ll cover the types of comments in Terraform, how to use them effectively, and best practices for writing clear, concise annotations.
There are two main types of comments in Terraform. They are used to annotate the configuration by providing context and explanations:
Single-line comments. Start with # or // and are used for brief explanations or disabling specific lines of code. Multi-line comments. Enclosed in a comment block between /* and */ and are used for longer explanations or commenting out blocks of code.
Regardless of type, comments are ignored by the Terraform parser and do not affect the actual execution of the code.
When using custom tooling or integrations, you may encounter references to /// comments. These are not officially supported as part of Terraform's syntax but are sometimes utilized in specialized workflows.
For example, some documentation generation tools or linters may interpret lines beginning with /// as markers for extracting structured documentation, similar to how certain programming languages use triple-slash comments.
Comments should enhance understanding and collaboration without cluttering the codebase. Here are some common scenarios when you should include comments in your configurations:
Explain the purpose . Describe the purpose of a resource, variable, or module to provide context.
. Describe the purpose of a resource, variable, or module to provide context. Document assumptions . Highlight assumptions made during the configuration.
. Highlight assumptions made during the configuration. Mark TODOs . Use comments to note areas that need further attention or future updates ([website], # TODO: Add monitoring ).
. Use comments to note areas that need further attention or future updates ([website], ). Provide references . Link to documentation or ticket numbers related to the code.
. Link to documentation or ticket numbers related to the code. Versioning. Comment on the configuration to reflect the Terraform or provider version compatibility.
How to Add Single-Line Comments in Terraform Files.
Single-line comments are added in Terraform code using the # or // symbols. Both styles are supported, and you can use them interchangeably, depending on your preference.
Note: Using # is considered the default comment style and is more commonly used in Terraform configurations. It is the standard style in most Terraform examples and documentation.
Single-line and inline comments using the hash symbol:
Plain Text # Define an AWS EC2 instance resource "aws_instance" "example" { ami = "ami-12345678" # Amazon Machine Image ID instance_type = "[website]" # Instance type }.
Single-line and inline comments using double slashes:
Plain Text // Define an AWS S3 bucket resource "aws_s3_bucket" "example" { bucket = "example-bucket-name" // Name of the S3 bucket acl = "private" // Access control list for the bucket }.
Inline comments can follow any valid Terraform configuration line. Ensure there is a space between the code and the comment for readability.
How to Add Multiline Comments in Terraform Files.
For multi-line comments, Terraform supports standard block comments using the /* ... */ syntax. Everything between /* and */ is treated as a comment, similar to multi-line comments in many programming languages like Java or C.
Plain Text /* This is a multiline comment in Terraform. Use this to document: - Configuration details - Explanation of resources - Notes for other team members Block comments are clean and versatile. */ resource "aws_instance" "example" { ami = "ami-12345678" instance_type = "[website]" }.
Alternatively, you can use the # symbol at the beginning of each line for multiline comments. While this isn't a true "block comment," it works for multiple lines.
Plain Text # This is a multiline comment in Terraform. # Use this format when you prefer single-line hash comments: # - Each line starts with a hash (#). # - Provides clear separation for each line.
Multiline comments are particularly useful for temporarily commenting out sections of your Terraform code or providing detailed documentation directly in your configuration files.
Best Practices for Commenting in Terraform Code.
Follow the best practices below to create clear, maintainable, and professional Terraform configurations.
Standardize comment style . Use a consistent format for comments across your infrastructure to improve readability and reduce confusion when working with large teams.
. Use a consistent format for comments across your infrastructure to improve readability and reduce confusion when working with large teams. Avoid over-commenting . Too many comments, especially redundant ones, can clutter the codebase and reduce readability.
. Too many comments, especially redundant ones, can clutter the codebase and reduce readability. Avoid overusing inline comments . Excessive inline comments can break code flow and make configurations harder to read. Use inline comments sparingly and only for clarifications that are immediately relevant.
. Excessive inline comments can break code flow and make configurations harder to read. Use inline comments sparingly and only for clarifications that are immediately relevant. Avoid commenting sensitive information . Comments may inadvertently expose passwords, API keys, or other sensitive details, leading to security vulnerabilities. Avoid including sensitive information in comments or configuration files. Use environment variables or secret management tools instead.
. Comments may inadvertently expose passwords, API keys, or other sensitive details, leading to security vulnerabilities. Avoid including sensitive information in comments or configuration files. Use environment variables or secret management tools instead. Focus on intent . Terraform code is typically self-explanatory. Comments should add value by explaining why the configuration exists, not how it works. Focus on explaining the reasoning behind design choices, constraints, or any non-obvious decisions.
. Terraform code is typically self-explanatory. Comments should add value by explaining why the configuration exists, not how it works. Focus on explaining the reasoning behind design choices, constraints, or any non-obvious decisions. Document critical resources . Highlight resources with high impact ([website], production databases, IAM roles, or security groups) with notes about dependencies, limitations, or risks.
. Highlight resources with high impact ([website], production databases, IAM roles, or security groups) with notes about dependencies, limitations, or risks. Keep comments up-to-date . improvement comments when making changes to the code. Outdated comments can mislead other contributors.
. revision comments when making changes to the code. Outdated comments can mislead other contributors. Indicate manual processes . Some configurations require manual steps, and documenting these ensures they are not overlooked. Use comments to flag any manual actions or processes required before or after deployment.
. Some configurations require manual steps, and documenting these ensures they are not overlooked. Use comments to flag any manual actions or processes required before or after deployment. Automate comment checks. Tools like TFLint can be customized to include comment checks to ensure consistency, accuracy, and compliance with your team's coding standards.
Using comments effectively can improve collaboration within teams and make Terraform configurations easier to understand and maintain over time. However, it's critical to strike a balance — comments should enhance understanding without cluttering the codebase.
If you've ever needed some random data for testing or just wanted to add a bit of fun to your p......
The global enterprise AI market is expanding rapidly, and more and more businesses are exploring AI’s potential to drive innovation and efficiency. Th......
One of the key principles of writing a good data pipeline is ensuring accurate data is loaded into the target table. We have no control over......
How to Maximize the Azure Cosmos DB Availability

Most of the e-commerce applications are zero-tolerant of any downtime. Any impact on application resources can impact the overall availability metrics of the site. Azure Cosmos database is one of the major NoSQL databases used across the industry. Though the Azure Cosmos itself provides [website] minimum availability for a single region without an availability zone, how do we further improve the database availability with the options available in the Azure Cosmos?
Single-region reads will impact the availability and will also lead to a single point of failure. So, read-heavy applications should at least have multi-region read enabled, though multi-region writes are not an option for an application. But, multi-region write provides a greater availability on both read and write-heavy applications.
With multi-region write capability, you can enable multi-master replication, where all configured regions can serve as write endpoints.
Select regions based closer to the region where the application is deployed.
Configure multiple preferred regions based on the application's requirements to enhance availability.
Set more than one preferred region in the application for reads and writes to improve availability and reduce latency.
Set the preferred regions in the order of the application's current or nearest regions first in the list.
Java //Configure application deployed in West US 2 as below import [website]; import [website]; // ... CosmosClientBuilder clientBuilder = new CosmosClientBuilder() .setEndpoint(accountEndpoint) .setKey(accountKey) .setPreferredRegions([website]"West US 2", "East US")); CosmosClient client = clientBuilder.buildClient(); //.
Java //Configure application deployed in East US as below import [website]; import [website]; // ... CosmosClientBuilder clientBuilder = new CosmosClientBuilder() .setEndpoint(accountEndpoint) .setKey(accountKey) .setPreferredRegions([website] "East US","West US 2")); CosmosClient client = clientBuilder.buildClient(); //.
Though enabling multi-region read and writes can provide greater availability, configuring the application read and writes closer to the region it's being deployed and providing more than one preferred region helps the application to fall back immediately to the available region without any manual intervention.
Select consistency levels based on the application's requirements. Higher consistency expectations typically result in reduced availability. If the application demands strong data consistency, ensure it can tolerate potential higher latencies. Conversely, if weaker consistency is acceptable, the application can benefit from improved throughput and availability.
Choosing the right consistent level purely depends on the application's need, and though there might be an impact on the availability of stronger consistency, the overall availability of an application will not be impacted by choosing the stronger consistency levels.
Developers or associates can log in to the portal and manually failover to the next available region during an outage on the region the application is currently connected to. Though this option provides availability to some extent, it requires a manual intervention to failover, which can impact the overall site availability metrics.
Enabling service-managed failover allows Cosmos to automatically switch to the next available region based on the priority configured in the portal. This option eliminates the need for any application changes during the failover process.
Though both provide increased availability, service-managed failover throughput gives the flexibility of failing over to the next available region without worrying about the application deployment.
Defining a partition key in Azure Cosmos DB is crucial before running any application on it. Cosmos DB is highly efficient for read-intensive applications, so it's essential to consider the lookup criteria and define the queries for reading records from the database before integrating Cosmos DB into your application.
By default, every item in a Cosmos DB container is automatically indexed. However, excluding certain items or fields from indexing can help reduce the consumption of Request Units (RUs). It is just as essential to add fields for indexing as it is to remove indexes on fields that aren't required to be indexed.
Avoid storing excessively large items in Azure Cosmos DB.
Minimize cross-partition queries whenever possible.
Ensure queries include filters to improve efficiency.
Avoid querying the same partition key repeatedly; rather, implement a caching layer on such use cases.
Azure Cosmos DB supports both standard (manual) and autoscale throughput at the container level.
The application decides the RU/s allowed, and maxing out the RU/s requests will be throttled for the configured time. Requires manual intervention to increase the throughput.
The application can configure the maximum throughput it supports, and Cosmos autoscales itself based on the traffic received. On exceeding the autoscale throughput, requests will be throttled for configured time.
Though both provide increased availability, autoscale throughput gives the flexibility of handling varying traffic without throttling or impacting the availability.
Azure Cosmos DB enables periodic backups by default for all accounts.
Backups are taken periodically for every configured minute with a minimum value of 1 hour and a maximum of 24 hours. It also provides options to keep the backup storage redundant at the Geo, Zone, or Local level. The application team needs to reach out to the support to retrieve the backup.
The continuous backup option keeps the backup storage on the region's Cosmos database configured, and it allows the retention of data from the last 7 days or from the last 30 days. It also provides point in time restoration.
Opting for continuous backup ensures faster restoration of the database. This eliminates the need for back-and-forth interactions with support to restore the database and allows applications to restore it to any region (where backups exist) at a specific point in time.
In conclusion, while availability metrics are crucial for any application, they come at a cost. Options that offer higher availability than the standard configuration incur additional expenses. Moreover, the above-mentioned options may not be necessary or suitable for all applications using Cosmos. However, it is essential to adopt and implement best practices in Azure Cosmos to optimize availability effectively.
Over the last couple of years, the tech industry has accelerated efforts to consolidate tooling and increase automation, in an effort to lighten the c......
I’ve been a software engineer for a little over a decade now, and I like to think I’m a pretty organized person. I have a system for everything, and t......
InfoQ is introducing its first hands-on software architecture certification at QCon London 2025 (April 7-11), the international software development c......
Market Impact Analysis
Market Growth Trend
2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 |
---|---|---|---|---|---|---|
7.5% | 9.0% | 9.4% | 10.5% | 11.0% | 11.4% | 11.5% |
Quarterly Growth Rate
Q1 2024 | Q2 2024 | Q3 2024 | Q4 2024 |
---|---|---|---|
10.8% | 11.1% | 11.3% | 11.5% |
Market Segments and Growth Drivers
Segment | Market Share | Growth Rate |
---|---|---|
Enterprise Software | 38% | 10.8% |
Cloud Services | 31% | 17.5% |
Developer Tools | 14% | 9.3% |
Security Software | 12% | 13.2% |
Other Software | 5% | 7.5% |
Technology Maturity Curve
Different technologies within the ecosystem are at varying stages of maturity:
Competitive Landscape Analysis
Company | Market Share |
---|---|
Microsoft | 22.6% |
Oracle | 14.8% |
SAP | 12.5% |
Salesforce | 9.7% |
Adobe | 8.3% |
Future Outlook and Predictions
The What Earth Types landscape is evolving rapidly, driven by technological advancements, changing threat vectors, and shifting business requirements. Based on current trends and expert analyses, we can anticipate several significant developments across different time horizons:
Year-by-Year Technology Evolution
Based on current trajectory and expert analyses, we can project the following development timeline:
Technology Maturity Curve
Different technologies within the ecosystem are at varying stages of maturity, influencing adoption timelines and investment priorities:
Innovation Trigger
- Generative AI for specialized domains
- Blockchain for supply chain verification
Peak of Inflated Expectations
- Digital twins for business processes
- Quantum-resistant cryptography
Trough of Disillusionment
- Consumer AR/VR applications
- General-purpose blockchain
Slope of Enlightenment
- AI-driven analytics
- Edge computing
Plateau of Productivity
- Cloud infrastructure
- Mobile applications
Technology Evolution Timeline
- Technology adoption accelerating across industries
- digital transformation initiatives becoming mainstream
- Significant transformation of business processes through advanced technologies
- new digital business models emerging
- Fundamental shifts in how technology integrates with business and society
- emergence of new technology paradigms
Expert Perspectives
Leading experts in the software dev sector provide diverse perspectives on how the landscape will evolve over the coming years:
"Technology transformation will continue to accelerate, creating both challenges and opportunities."
— Industry Expert
"Organizations must balance innovation with practical implementation to achieve meaningful results."
— Technology Analyst
"The most successful adopters will focus on business outcomes rather than technology for its own sake."
— Research Director
Areas of Expert Consensus
- Acceleration of Innovation: The pace of technological evolution will continue to increase
- Practical Integration: Focus will shift from proof-of-concept to operational deployment
- Human-Technology Partnership: Most effective implementations will optimize human-machine collaboration
- Regulatory Influence: Regulatory frameworks will increasingly shape technology development
Short-Term Outlook (1-2 Years)
In the immediate future, organizations will focus on implementing and optimizing currently available technologies to address pressing software dev challenges:
- Technology adoption accelerating across industries
- digital transformation initiatives becoming mainstream
These developments will be characterized by incremental improvements to existing frameworks rather than revolutionary changes, with emphasis on practical deployment and measurable outcomes.
Mid-Term Outlook (3-5 Years)
As technologies mature and organizations adapt, more substantial transformations will emerge in how security is approached and implemented:
- Significant transformation of business processes through advanced technologies
- new digital business models emerging
This period will see significant changes in security architecture and operational models, with increasing automation and integration between previously siloed security functions. Organizations will shift from reactive to proactive security postures.
Long-Term Outlook (5+ Years)
Looking further ahead, more fundamental shifts will reshape how cybersecurity is conceptualized and implemented across digital ecosystems:
- Fundamental shifts in how technology integrates with business and society
- emergence of new technology paradigms
These long-term developments will likely require significant technical breakthroughs, new regulatory frameworks, and evolution in how organizations approach security as a fundamental business function rather than a technical discipline.
Key Risk Factors and Uncertainties
Several critical factors could significantly impact the trajectory of software dev evolution:
Organizations should monitor these factors closely and develop contingency strategies to mitigate potential negative impacts on technology implementation timelines.
Alternative Future Scenarios
The evolution of technology can follow different paths depending on various factors including regulatory developments, investment trends, technological breakthroughs, and market adoption. We analyze three potential scenarios:
Optimistic Scenario
Rapid adoption of advanced technologies with significant business impact
Key Drivers: Supportive regulatory environment, significant research breakthroughs, strong market incentives, and rapid user adoption.
Probability: 25-30%
Base Case Scenario
Measured implementation with incremental improvements
Key Drivers: Balanced regulatory approach, steady technological progress, and selective implementation based on clear ROI.
Probability: 50-60%
Conservative Scenario
Technical and organizational barriers limiting effective adoption
Key Drivers: Restrictive regulations, technical limitations, implementation challenges, and risk-averse organizational cultures.
Probability: 15-20%
Scenario Comparison Matrix
Factor | Optimistic | Base Case | Conservative |
---|---|---|---|
Implementation Timeline | Accelerated | Steady | Delayed |
Market Adoption | Widespread | Selective | Limited |
Technology Evolution | Rapid | Progressive | Incremental |
Regulatory Environment | Supportive | Balanced | Restrictive |
Business Impact | Transformative | Significant | Modest |
Transformational Impact
Technology becoming increasingly embedded in all aspects of business operations. This evolution will necessitate significant changes in organizational structures, talent development, and strategic planning processes.
The convergence of multiple technological trends—including artificial intelligence, quantum computing, and ubiquitous connectivity—will create both unprecedented security challenges and innovative defensive capabilities.
Implementation Challenges
Technical complexity and organizational readiness remain key challenges. Organizations will need to develop comprehensive change management strategies to successfully navigate these transitions.
Regulatory uncertainty, particularly around emerging technologies like AI in security applications, will require flexible security architectures that can adapt to evolving compliance requirements.
Key Innovations to Watch
Artificial intelligence, distributed systems, and automation technologies leading innovation. Organizations should monitor these developments closely to maintain competitive advantages and effective security postures.
Strategic investments in research partnerships, technology pilots, and talent development will position forward-thinking organizations to leverage these innovations early in their development cycle.
Technical Glossary
Key technical terms and definitions to help understand the technologies discussed in this article.
Understanding the following technical concepts is essential for grasping the full implications of the security threats and defensive measures discussed in this article. These definitions provide context for both technical and non-technical readers.